1
0
Fork 0
mirror of https://github.com/rharkor/caching-for-turbo.git synced 2025-06-09 09:35:17 +09:00

refactor: action post

This commit is contained in:
rharkor 2024-06-23 15:05:29 +02:00
parent 93a790e158
commit 0831fefb81
17 changed files with 27211 additions and 80 deletions

1
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

26950
dist/post/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/post/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

120
dist/post/licenses.txt generated vendored Normal file
View file

@ -0,0 +1,120 @@
@actions/core
MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@actions/http-client
MIT
Actions Http Client for Node.js
Copyright (c) GitHub, Inc.
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
tunnel
MIT
The MIT License (MIT)
Copyright (c) 2012 Koichi Kobayashi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
uuid
MIT
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

141
dist/index.js → dist/setup/index.js generated vendored
View file

@ -122712,7 +122712,8 @@ function wrappy (fn, cb) {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCache = exports.saveCache = void 0;
exports.saveCache = saveCache;
exports.getCache = getCache;
const env_1 = __nccwpck_require__(42343);
const promises_1 = __nccwpck_require__(76402);
const node_fs_1 = __nccwpck_require__(87561);
@ -122739,7 +122740,6 @@ async function saveCache(ctx, hash, tag, stream) {
await client.save(parseInt(id), stream);
ctx.log.info(`Saved cache ${id} for ${hash}`);
}
exports.saveCache = saveCache;
async function getCache(ctx, hash) {
if (!env_1.env.valid) {
const path = `/tmp/${hash}.tg.bin`;
@ -122769,7 +122769,6 @@ async function getCache(ctx, hash) {
}
return [size, readableStream, artifactTag];
}
exports.getCache = getCache;
/***/ }),
@ -122806,7 +122805,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCacheClient = void 0;
exports.getCacheClient = getCacheClient;
const env_1 = __nccwpck_require__(42343);
const core = __importStar(__nccwpck_require__(42186));
const cacheHttpClient = __importStar(__nccwpck_require__(98245));
@ -122910,7 +122909,6 @@ function getCacheClient() {
query
};
}
exports.getCacheClient = getCacheClient;
/***/ }),
@ -122989,7 +122987,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.server = void 0;
exports.server = server;
const fastify_1 = __importDefault(__nccwpck_require__(67834));
const constants_1 = __nccwpck_require__(80317);
const cache_1 = __nccwpck_require__(81241);
@ -123047,7 +123045,6 @@ async function server() {
//* Start the server
await fastify.listen({ port: constants_1.serverPort });
}
exports.server = server;
/***/ }),
@ -123084,7 +123081,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.killServer = exports.launchServer = exports.exportVariable = exports.waitForServer = void 0;
exports.exportVariable = exports.waitForServer = void 0;
exports.launchServer = launchServer;
exports.killServer = killServer;
const wait_on_1 = __importDefault(__nccwpck_require__(69037));
const constants_1 = __nccwpck_require__(80317);
const core = __importStar(__nccwpck_require__(42186));
@ -123137,14 +123136,12 @@ async function launchServer(devRun) {
(0, exports.exportVariable)('TURBO_TEAM', 'turbogha');
}
}
exports.launchServer = launchServer;
async function killServer() {
//* Kill the server
await fetch(`http://localhost:${constants_1.serverPort}/shutdown`, {
method: 'DELETE'
});
}
exports.killServer = killServer;
/***/ }),
@ -123178,7 +123175,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = void 0;
exports.run = run;
const core = __importStar(__nccwpck_require__(42186));
const server_1 = __nccwpck_require__(48872);
const utils_1 = __nccwpck_require__(19697);
@ -123201,7 +123198,6 @@ async function run() {
core.setFailed(error.message);
}
}
exports.run = run;
/***/ }),
@ -139649,7 +139645,7 @@ module.exports = {
"use strict";
const VERSION = '4.27.0'
const VERSION = '4.28.0'
const Avvio = __nccwpck_require__(4488)
const http = __nccwpck_require__(88849)
@ -142629,10 +142625,8 @@ module.exports = {
/* istanbul ignore file */
const { dependencies } = __nccwpck_require__(23591)
const { Serializer, Validator } = dependencies
const Serializer = __nccwpck_require__(52234)
const serializerState = {"mode":"standalone"}
const serializer = Serializer.restoreFromState(serializerState)
@ -142642,6 +142636,18 @@ module.exports = {
module.exports = function anonymous(validator,serializer
) {
const JSON_STR_BEGIN_OBJECT = '{'
const JSON_STR_END_OBJECT = '}'
const JSON_STR_BEGIN_ARRAY = '['
const JSON_STR_END_ARRAY = ']'
const JSON_STR_COMMA = ','
const JSON_STR_COLONS = ':'
const JSON_STR_QUOTE = '"'
const JSON_STR_EMPTY_OBJECT = JSON_STR_BEGIN_OBJECT + JSON_STR_END_OBJECT
const JSON_STR_EMPTY_ARRAY = JSON_STR_BEGIN_ARRAY + JSON_STR_END_ARRAY
const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE
const JSON_STR_NULL = 'null'
// #
@ -142650,36 +142656,83 @@ module.exports = {
? input.toJSON()
: input
if (obj === null) return '{}'
if (obj === null) return JSON_STR_EMPTY_OBJECT
let json = '{'
let value
let json = JSON_STR_BEGIN_OBJECT
let addComma = false
if (obj["statusCode"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
value = obj["statusCode"]
if (value !== undefined) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA)
json += "\"statusCode\":"
json += serializer.asNumber(obj["statusCode"])
json += serializer.asNumber(value)
}
if (obj["code"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
value = obj["code"]
if (value !== undefined) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA)
json += "\"code\":"
json += serializer.asString(obj["code"])
if (typeof value !== 'string') {
if (value === null) {
json += JSON_STR_EMPTY_STRING
} else if (value instanceof Date) {
json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE
} else if (value instanceof RegExp) {
json += serializer.asString(value.source)
} else {
json += serializer.asString(value.toString())
}
} else {
json += serializer.asString(value)
}
}
if (obj["error"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
value = obj["error"]
if (value !== undefined) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA)
json += "\"error\":"
json += serializer.asString(obj["error"])
if (typeof value !== 'string') {
if (value === null) {
json += JSON_STR_EMPTY_STRING
} else if (value instanceof Date) {
json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE
} else if (value instanceof RegExp) {
json += serializer.asString(value.source)
} else {
json += serializer.asString(value.toString())
}
} else {
json += serializer.asString(value)
}
}
if (obj["message"] !== undefined) {
!addComma && (addComma = true) || (json += ',')
value = obj["message"]
if (value !== undefined) {
!addComma && (addComma = true) || (json += JSON_STR_COMMA)
json += "\"message\":"
json += serializer.asString(obj["message"])
if (typeof value !== 'string') {
if (value === null) {
json += JSON_STR_EMPTY_STRING
} else if (value instanceof Date) {
json += JSON_STR_QUOTE + value.toISOString() + JSON_STR_QUOTE
} else if (value instanceof RegExp) {
json += serializer.asString(value.source)
} else {
json += serializer.asString(value.toString())
}
} else {
json += serializer.asString(value)
}
}
return json + '}'
return json + JSON_STR_END_OBJECT
}
@ -144610,7 +144663,7 @@ const {
FST_ERR_MISSING_SERIALIZATION_FN,
FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN
} = __nccwpck_require__(89005)
const { FSTDEP010, FSTDEP013, FSTDEP019, FSTDEP020 } = __nccwpck_require__(59283)
const { FSTDEP010, FSTDEP013, FSTDEP019, FSTDEP020, FSTDEP021 } = __nccwpck_require__(59283)
const toString = Object.prototype.toString
@ -145012,9 +145065,15 @@ Reply.prototype.type = function (type) {
return this
}
Reply.prototype.redirect = function (code, url) {
if (typeof code === 'string') {
url = code
Reply.prototype.redirect = function (url, code) {
if (typeof url === 'number') {
FSTDEP021()
const temp = code
code = url
url = temp
}
if (!code) {
code = this[kReplyHasStatusCode] ? this.raw.statusCode : 302
}
@ -146132,7 +146191,11 @@ function buildRouting (options) {
}
function hasRoute ({ options }) {
return findRoute(options) !== null
const normalizedMethod = options.method?.toUpperCase() ?? ''
return findRoute({
...options,
method: normalizedMethod
}) !== null
}
function findRoute (options) {
@ -147826,6 +147889,11 @@ const FSTDEP020 = createDeprecation({
message: 'You are using the deprecated "reply.getResponseTime()" method. Use the "reply.elapsedTime" property instead. Method "reply.getResponseTime()" will be removed in `fastify@5`.'
})
const FSTDEP021 = createDeprecation({
code: 'FSTDEP021',
message: 'The `reply.redirect()` method has a new signature: `reply.redirect(url: string, code?: number)`. It will be enforced in `fastify@v5`'
})
const FSTWRN001 = createWarning({
name: 'FastifyWarning',
code: 'FSTWRN001',
@ -147857,6 +147925,7 @@ module.exports = {
FSTDEP018,
FSTDEP019,
FSTDEP020,
FSTDEP021,
FSTWRN001,
FSTWRN002
}

1
dist/setup/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

1
dist/setup/sourcemap-register.js generated vendored Normal file

File diff suppressed because one or more lines are too long

View file

View file