skuba 13.0.0-custom-conditions-exports-20250923055337 → 13.0.0-custom-conditions-exports-20251003064544
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/build/assets.js +3 -7
- package/lib/cli/build/assets.js.map +2 -2
- package/lib/cli/build/esbuild.d.ts +2 -1
- package/lib/cli/build/esbuild.js +4 -3
- package/lib/cli/build/esbuild.js.map +2 -2
- package/lib/cli/build/index.js +8 -4
- package/lib/cli/build/index.js.map +2 -2
- package/lib/cli/init/git.js +1 -1
- package/lib/cli/init/git.js.map +2 -2
- package/lib/cli/init/index.js +4 -4
- package/lib/cli/init/index.js.map +3 -3
- package/lib/cli/lint/annotate/buildkite/eslint.js +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/index.js +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/internal.js +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/prettier.js +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/tsc.js +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +2 -2
- package/lib/cli/lint/annotate/github/eslint.d.ts +1 -1
- package/lib/cli/lint/annotate/github/eslint.js.map +2 -2
- package/lib/cli/lint/annotate/github/index.js +3 -4
- package/lib/cli/lint/annotate/github/index.js.map +2 -2
- package/lib/cli/lint/annotate/github/internal.d.ts +1 -1
- package/lib/cli/lint/annotate/github/internal.js.map +2 -2
- package/lib/cli/lint/annotate/github/prettier.d.ts +1 -1
- package/lib/cli/lint/annotate/github/prettier.js.map +2 -2
- package/lib/cli/lint/annotate/github/tsc.d.ts +1 -1
- package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
- package/lib/cli/lint/autofix.d.ts +1 -1
- package/lib/cli/lint/autofix.js +3 -3
- package/lib/cli/lint/autofix.js.map +2 -2
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +1 -1
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
- package/lib/{api/buildkite → cli/lint/internalLints/upgrade/patches/12.3.0}/index.js +17 -9
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +100 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +99 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.d.ts +2 -0
- package/lib/{api/net → cli/lint/internalLints/upgrade/patches/12.4.0}/index.js +12 -6
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.d.ts +3 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +101 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/index.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.d.ts +13 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.js +225 -0
- package/lib/cli/lint/internalLints/upgrade/patches/13.0.0/rewriteSrcImports.js.map +7 -0
- package/lib/cli/test/reporters/github/annotations.d.ts +1 -1
- package/lib/cli/test/reporters/github/annotations.js.map +1 -1
- package/lib/cli/test/reporters/github/index.js +3 -4
- package/lib/cli/test/reporters/github/index.js.map +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +4 -4
- package/lib/index.js.map +2 -2
- package/lib/utils/dir.js +2 -2
- package/lib/utils/dir.js.map +3 -3
- package/lib/utils/manifest.d.ts +5 -1
- package/lib/utils/manifest.js +16 -7
- package/lib/utils/manifest.js.map +2 -2
- package/package.json +4 -3
- package/template/base/_pnpm-workspace.yaml +1 -0
- package/template/express-rest-api/Dockerfile +1 -1
- package/template/express-rest-api/Dockerfile.dev-deps +0 -2
- package/template/express-rest-api/package.json +1 -1
- package/template/greeter/Dockerfile +0 -2
- package/template/greeter/package.json +2 -2
- package/template/koa-rest-api/Dockerfile +1 -1
- package/template/koa-rest-api/Dockerfile.dev-deps +0 -2
- package/template/koa-rest-api/package.json +1 -1
- package/template/lambda-sqs-worker-cdk/Dockerfile +0 -2
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +2 -2
- package/template/oss-npm-package/.github/workflows/release.yml +1 -1
- package/template/oss-npm-package/README.md +1 -1
- package/lib/api/buildkite/annotate.d.ts +0 -28
- package/lib/api/buildkite/annotate.js +0 -62
- package/lib/api/buildkite/annotate.js.map +0 -7
- package/lib/api/buildkite/index.d.ts +0 -3
- package/lib/api/buildkite/index.js.map +0 -7
- package/lib/api/buildkite/md.d.ts +0 -6
- package/lib/api/buildkite/md.js +0 -33
- package/lib/api/buildkite/md.js.map +0 -7
- package/lib/api/git/commit.d.ts +0 -15
- package/lib/api/git/commit.js +0 -52
- package/lib/api/git/commit.js.map +0 -7
- package/lib/api/git/commitAllChanges.d.ts +0 -19
- package/lib/api/git/commitAllChanges.js +0 -83
- package/lib/api/git/commitAllChanges.js.map +0 -7
- package/lib/api/git/currentBranch.d.ts +0 -10
- package/lib/api/git/currentBranch.js +0 -59
- package/lib/api/git/currentBranch.js.map +0 -7
- package/lib/api/git/findRoot.d.ts +0 -9
- package/lib/api/git/findRoot.js +0 -52
- package/lib/api/git/findRoot.js.map +0 -7
- package/lib/api/git/getChangedFiles.d.ts +0 -20
- package/lib/api/git/getChangedFiles.js +0 -81
- package/lib/api/git/getChangedFiles.js.map +0 -7
- package/lib/api/git/index.d.ts +0 -12
- package/lib/api/git/index.js +0 -61
- package/lib/api/git/index.js.map +0 -7
- package/lib/api/git/isFileGitIgnored.d.ts +0 -4
- package/lib/api/git/isFileGitIgnored.js +0 -49
- package/lib/api/git/isFileGitIgnored.js.map +0 -7
- package/lib/api/git/log.d.ts +0 -19
- package/lib/api/git/log.js +0 -71
- package/lib/api/git/log.js.map +0 -7
- package/lib/api/git/pull.d.ts +0 -35
- package/lib/api/git/pull.js +0 -69
- package/lib/api/git/pull.js.map +0 -7
- package/lib/api/git/push.d.ts +0 -52
- package/lib/api/git/push.js +0 -70
- package/lib/api/git/push.js.map +0 -7
- package/lib/api/git/remote.d.ts +0 -20
- package/lib/api/git/remote.js +0 -73
- package/lib/api/git/remote.js.map +0 -7
- package/lib/api/git/reset.d.ts +0 -12
- package/lib/api/git/reset.js +0 -62
- package/lib/api/git/reset.js.map +0 -7
- package/lib/api/git/statusMatrix.d.ts +0 -7
- package/lib/api/git/statusMatrix.js +0 -47
- package/lib/api/git/statusMatrix.js.map +0 -7
- package/lib/api/github/checkRun.d.ts +0 -44
- package/lib/api/github/checkRun.js +0 -81
- package/lib/api/github/checkRun.js.map +0 -7
- package/lib/api/github/environment.d.ts +0 -17
- package/lib/api/github/environment.js +0 -48
- package/lib/api/github/environment.js.map +0 -7
- package/lib/api/github/index.d.ts +0 -7
- package/lib/api/github/index.js +0 -48
- package/lib/api/github/index.js.map +0 -7
- package/lib/api/github/issueComment.d.ts +0 -61
- package/lib/api/github/issueComment.js +0 -99
- package/lib/api/github/issueComment.js.map +0 -7
- package/lib/api/github/octokit.d.ts +0 -6
- package/lib/api/github/octokit.js +0 -42
- package/lib/api/github/octokit.js.map +0 -7
- package/lib/api/github/pullRequest.d.ts +0 -21
- package/lib/api/github/pullRequest.js +0 -69
- package/lib/api/github/pullRequest.js.map +0 -7
- package/lib/api/github/push.d.ts +0 -85
- package/lib/api/github/push.js +0 -166
- package/lib/api/github/push.js.map +0 -7
- package/lib/api/net/compose.d.ts +0 -4
- package/lib/api/net/compose.js +0 -51
- package/lib/api/net/compose.js.map +0 -7
- package/lib/api/net/index.d.ts +0 -1
- package/lib/api/net/index.js.map +0 -7
- package/lib/api/net/socket.d.ts +0 -5
- package/lib/api/net/socket.js +0 -68
- package/lib/api/net/socket.js.map +0 -7
- package/lib/api/net/waitFor.d.ts +0 -22
- package/lib/api/net/waitFor.js +0 -40
- package/lib/api/net/waitFor.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.d.ts +0 -6
- package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.js +0 -110
- package/lib/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.js.map +0 -7
- /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 12.3.0}/index.d.ts +0 -0
- /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.d.ts +0 -0
- /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.js +0 -0
- /package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/index.js +0 -0
package/lib/api/net/socket.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var socket_exports = {};
|
|
30
|
-
__export(socket_exports, {
|
|
31
|
-
pollSocket: () => pollSocket
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(socket_exports);
|
|
34
|
-
var import_net = __toESM(require("net"));
|
|
35
|
-
const trySocket = async (host, port) => new Promise((resolve) => {
|
|
36
|
-
const socket = new import_net.default.Socket();
|
|
37
|
-
const onFailure = () => {
|
|
38
|
-
socket.destroy();
|
|
39
|
-
resolve(false);
|
|
40
|
-
};
|
|
41
|
-
const onSuccess = () => socket.end(() => resolve(true));
|
|
42
|
-
socket.connect(port, host, onSuccess).once("error", onFailure).once("timeout", onFailure).setTimeout(1e3);
|
|
43
|
-
});
|
|
44
|
-
const pollSocket = async (host, port, timeout) => new Promise((resolve, reject) => {
|
|
45
|
-
const callPort = async () => {
|
|
46
|
-
const success = await trySocket(host, port);
|
|
47
|
-
if (!success) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
clearTimeout(intervalId);
|
|
51
|
-
clearTimeout(timeoutId);
|
|
52
|
-
resolve();
|
|
53
|
-
};
|
|
54
|
-
const intervalId = setInterval(() => {
|
|
55
|
-
callPort().catch(() => void 0);
|
|
56
|
-
}, 250);
|
|
57
|
-
const timeoutId = setTimeout(() => {
|
|
58
|
-
clearTimeout(intervalId);
|
|
59
|
-
clearTimeout(timeoutId);
|
|
60
|
-
reject(Error(`could not reach ${host}:${port} within ${timeout}ms`));
|
|
61
|
-
}, timeout);
|
|
62
|
-
callPort().catch(() => void 0);
|
|
63
|
-
});
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
pollSocket
|
|
67
|
-
});
|
|
68
|
-
//# sourceMappingURL=socket.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/api/net/socket.ts"],
|
|
4
|
-
"sourcesContent": ["import net from 'net';\n\nexport interface SocketAddress {\n host: string;\n port: number;\n}\n\nconst trySocket = async (host: string, port: number) =>\n new Promise((resolve) => {\n const socket = new net.Socket();\n\n const onFailure = () => {\n socket.destroy();\n resolve(false);\n };\n\n const onSuccess = () => socket.end(() => resolve(true));\n\n socket\n .connect(port, host, onSuccess)\n .once('error', onFailure)\n .once('timeout', onFailure)\n .setTimeout(1_000);\n });\n\nexport const pollSocket = async (host: string, port: number, timeout: number) =>\n new Promise<void>((resolve, reject) => {\n const callPort = async () => {\n const success = await trySocket(host, port);\n\n if (!success) {\n return;\n }\n\n clearTimeout(intervalId);\n clearTimeout(timeoutId);\n\n resolve();\n };\n\n const intervalId = setInterval(() => {\n callPort().catch(() => undefined);\n }, 250);\n\n const timeoutId = setTimeout(() => {\n clearTimeout(intervalId);\n clearTimeout(timeoutId);\n\n reject(Error(`could not reach ${host}:${port} within ${timeout}ms`));\n }, timeout);\n\n callPort().catch(() => undefined);\n });\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgB;AAOhB,MAAM,YAAY,OAAO,MAAc,SACrC,IAAI,QAAQ,CAAC,YAAY;AACvB,QAAM,SAAS,IAAI,WAAAA,QAAI,OAAO;AAE9B,QAAM,YAAY,MAAM;AACtB,WAAO,QAAQ;AACf,YAAQ,KAAK;AAAA,EACf;AAEA,QAAM,YAAY,MAAM,OAAO,IAAI,MAAM,QAAQ,IAAI,CAAC;AAEtD,SACG,QAAQ,MAAM,MAAM,SAAS,EAC7B,KAAK,SAAS,SAAS,EACvB,KAAK,WAAW,SAAS,EACzB,WAAW,GAAK;AACrB,CAAC;AAEI,MAAM,aAAa,OAAO,MAAc,MAAc,YAC3D,IAAI,QAAc,CAAC,SAAS,WAAW;AACrC,QAAM,WAAW,YAAY;AAC3B,UAAM,UAAU,MAAM,UAAU,MAAM,IAAI;AAE1C,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AAEA,iBAAa,UAAU;AACvB,iBAAa,SAAS;AAEtB,YAAQ;AAAA,EACV;AAEA,QAAM,aAAa,YAAY,MAAM;AACnC,aAAS,EAAE,MAAM,MAAM,MAAS;AAAA,EAClC,GAAG,GAAG;AAEN,QAAM,YAAY,WAAW,MAAM;AACjC,iBAAa,UAAU;AACvB,iBAAa,SAAS;AAEtB,WAAO,MAAM,mBAAmB,IAAI,IAAI,IAAI,WAAW,OAAO,IAAI,CAAC;AAAA,EACrE,GAAG,OAAO;AAEV,WAAS,EAAE,MAAM,MAAM,MAAS;AAClC,CAAC;",
|
|
6
|
-
"names": ["net"]
|
|
7
|
-
}
|
package/lib/api/net/waitFor.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type SocketAddress } from './socket.js';
|
|
2
|
-
/**
|
|
3
|
-
* Wait for a resource to start listening on a socket address.
|
|
4
|
-
*
|
|
5
|
-
* The socket is polled on an interval until it accepts a connection or the
|
|
6
|
-
* `timeout` is reached.
|
|
7
|
-
*/
|
|
8
|
-
export declare const waitFor: ({ host, port, resolveCompose, timeout, }: {
|
|
9
|
-
host?: string;
|
|
10
|
-
port: number;
|
|
11
|
-
/**
|
|
12
|
-
* Whether to treat the `host` and `port` arguments as a private Docker
|
|
13
|
-
* Compose network address and to resolve them to a public local address.
|
|
14
|
-
*
|
|
15
|
-
* This is typically:
|
|
16
|
-
*
|
|
17
|
-
* - Enabled locally, when the application is running directly on the machine
|
|
18
|
-
* - Disabled in CI, when running in a container on the Docker Compose network
|
|
19
|
-
*/
|
|
20
|
-
resolveCompose?: boolean;
|
|
21
|
-
timeout?: number;
|
|
22
|
-
}) => Promise<SocketAddress>;
|
package/lib/api/net/waitFor.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var waitFor_exports = {};
|
|
20
|
-
__export(waitFor_exports, {
|
|
21
|
-
waitFor: () => waitFor
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(waitFor_exports);
|
|
24
|
-
var import_compose = require("./compose.js");
|
|
25
|
-
var import_socket = require("./socket.js");
|
|
26
|
-
const waitFor = async ({
|
|
27
|
-
host = "localhost",
|
|
28
|
-
port,
|
|
29
|
-
resolveCompose = false,
|
|
30
|
-
timeout = 15e3
|
|
31
|
-
}) => {
|
|
32
|
-
const resolvedAddress = resolveCompose ? await (0, import_compose.resolveComposeAddress)(host, port) : { host, port };
|
|
33
|
-
await (0, import_socket.pollSocket)(resolvedAddress.host, resolvedAddress.port, timeout);
|
|
34
|
-
return resolvedAddress;
|
|
35
|
-
};
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
waitFor
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=waitFor.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/api/net/waitFor.ts"],
|
|
4
|
-
"sourcesContent": ["import { resolveComposeAddress } from './compose.js';\nimport { type SocketAddress, pollSocket } from './socket.js';\n\n/**\n * Wait for a resource to start listening on a socket address.\n *\n * The socket is polled on an interval until it accepts a connection or the\n * `timeout` is reached.\n */\nexport const waitFor = async ({\n host = 'localhost',\n port,\n resolveCompose = false,\n timeout = 15_000,\n}: {\n host?: string;\n\n port: number;\n\n /**\n * Whether to treat the `host` and `port` arguments as a private Docker\n * Compose network address and to resolve them to a public local address.\n *\n * This is typically:\n *\n * - Enabled locally, when the application is running directly on the machine\n * - Disabled in CI, when running in a container on the Docker Compose network\n */\n resolveCompose?: boolean;\n\n timeout?: number;\n}): Promise<SocketAddress> => {\n const resolvedAddress = resolveCompose\n ? await resolveComposeAddress(host, port)\n : { host, port };\n\n await pollSocket(resolvedAddress.host, resolvedAddress.port, timeout);\n\n return resolvedAddress;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAsC;AACtC,oBAA+C;AAQxC,MAAM,UAAU,OAAO;AAAA,EAC5B,OAAO;AAAA,EACP;AAAA,EACA,iBAAiB;AAAA,EACjB,UAAU;AACZ,MAiB8B;AAC5B,QAAM,kBAAkB,iBACpB,UAAM,sCAAsB,MAAM,IAAI,IACtC,EAAE,MAAM,KAAK;AAEjB,YAAM,0BAAW,gBAAgB,MAAM,gBAAgB,MAAM,OAAO;AAEpE,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PatchFunction } from '../../index.js';
|
|
2
|
-
export declare const hasSkubaDiveRegisterImportRegex: RegExp;
|
|
3
|
-
export declare const hasSrcImportRegex: RegExp;
|
|
4
|
-
export declare const replaceSrcImport: (contents: string) => string;
|
|
5
|
-
export declare const tryRewriteSrcImports: PatchFunction;
|
|
6
|
-
export declare const rewriteSrcImports: PatchFunction;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var rewriteSrcImports_exports = {};
|
|
30
|
-
__export(rewriteSrcImports_exports, {
|
|
31
|
-
hasSkubaDiveRegisterImportRegex: () => hasSkubaDiveRegisterImportRegex,
|
|
32
|
-
hasSrcImportRegex: () => hasSrcImportRegex,
|
|
33
|
-
replaceSrcImport: () => replaceSrcImport,
|
|
34
|
-
rewriteSrcImports: () => rewriteSrcImports,
|
|
35
|
-
tryRewriteSrcImports: () => tryRewriteSrcImports
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(rewriteSrcImports_exports);
|
|
38
|
-
var import_util = require("util");
|
|
39
|
-
var import_fast_glob = require("fast-glob");
|
|
40
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
41
|
-
var import_logging = require("../../../../../../utils/logging.js");
|
|
42
|
-
const fetchFiles = async (files) => Promise.all(
|
|
43
|
-
files.map(async (file) => {
|
|
44
|
-
const contents = await import_fs_extra.default.promises.readFile(file, "utf8");
|
|
45
|
-
return {
|
|
46
|
-
file,
|
|
47
|
-
contents
|
|
48
|
-
};
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
const hasSkubaDiveRegisterImportRegex = /import\s+['"](?:skuba-dive\/register|\.\.?\/.*?register)(?:\.js)?['"];?\s*/gm;
|
|
52
|
-
const hasSrcImportRegex = /import\s+(?:type\s+\{[^}]*\}|\{[^}]*\}|\*\s+as\s+\w+|\w+(?:\s*,\s*\{[^}]*\})?)\s+from\s+['"]src\/[^'"]*['"]/gm;
|
|
53
|
-
const replaceSrcImport = (contents) => contents.replace(
|
|
54
|
-
hasSrcImportRegex,
|
|
55
|
-
(match) => match.replace(/(['"])src\//g, "$1#src/")
|
|
56
|
-
);
|
|
57
|
-
const removeSkubaDiveRegisterImport = (contents) => contents.replace(hasSkubaDiveRegisterImportRegex, "");
|
|
58
|
-
const replaceAllImports = (contents) => removeSkubaDiveRegisterImport(replaceSrcImport(contents));
|
|
59
|
-
const tryRewriteSrcImports = async ({
|
|
60
|
-
mode
|
|
61
|
-
}) => {
|
|
62
|
-
const tsFileNames = await (0, import_fast_glob.glob)(["**/*.ts", "**/*.test.ts"], {
|
|
63
|
-
ignore: [
|
|
64
|
-
"**/.git",
|
|
65
|
-
"**/node_modules",
|
|
66
|
-
"src/cli/lint/internalLints/upgrade/patches/**/*"
|
|
67
|
-
]
|
|
68
|
-
});
|
|
69
|
-
if (!tsFileNames.length) {
|
|
70
|
-
return {
|
|
71
|
-
result: "skip",
|
|
72
|
-
reason: "no .ts or test.ts files found"
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const tsFiles = await fetchFiles(tsFileNames);
|
|
76
|
-
const mapped = tsFiles.map(({ file, contents }) => ({
|
|
77
|
-
file,
|
|
78
|
-
before: contents,
|
|
79
|
-
after: replaceAllImports(contents)
|
|
80
|
-
}));
|
|
81
|
-
if (mode === "lint") {
|
|
82
|
-
return {
|
|
83
|
-
result: "apply"
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
await Promise.all(
|
|
87
|
-
mapped.map(async ({ file, after }) => {
|
|
88
|
-
await import_fs_extra.default.promises.writeFile(file, after);
|
|
89
|
-
})
|
|
90
|
-
);
|
|
91
|
-
return { result: "apply" };
|
|
92
|
-
};
|
|
93
|
-
const rewriteSrcImports = async (config) => {
|
|
94
|
-
try {
|
|
95
|
-
return await tryRewriteSrcImports(config);
|
|
96
|
-
} catch (err) {
|
|
97
|
-
import_logging.log.warn("Failed to rewrite src imports to #src");
|
|
98
|
-
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
99
|
-
return { result: "skip", reason: "due to an error" };
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
-
0 && (module.exports = {
|
|
104
|
-
hasSkubaDiveRegisterImportRegex,
|
|
105
|
-
hasSrcImportRegex,
|
|
106
|
-
replaceSrcImport,
|
|
107
|
-
rewriteSrcImports,
|
|
108
|
-
tryRewriteSrcImports
|
|
109
|
-
});
|
|
110
|
-
//# sourceMappingURL=rewriteSrcImports.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.2.0/rewriteSrcImports.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.promises.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nexport const hasSkubaDiveRegisterImportRegex =\n /import\\s+['\"](?:skuba-dive\\/register|\\.\\.?\\/.*?register)(?:\\.js)?['\"];?\\s*/gm;\n\nexport const hasSrcImportRegex =\n /import\\s+(?:type\\s+\\{[^}]*\\}|\\{[^}]*\\}|\\*\\s+as\\s+\\w+|\\w+(?:\\s*,\\s*\\{[^}]*\\})?)\\s+from\\s+['\"]src\\/[^'\"]*['\"]/gm;\n\nexport const replaceSrcImport = (contents: string) =>\n contents.replace(hasSrcImportRegex, (match) =>\n match.replace(/(['\"])src\\//g, '$1#src/'),\n );\n\nconst removeSkubaDiveRegisterImport = (contents: string) =>\n contents.replace(hasSkubaDiveRegisterImportRegex, '');\n\nconst replaceAllImports = (contents: string) =>\n removeSkubaDiveRegisterImport(replaceSrcImport(contents));\n\nexport const tryRewriteSrcImports: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const tsFileNames = await glob(['**/*.ts', '**/*.test.ts'], {\n ignore: [\n '**/.git',\n '**/node_modules',\n 'src/cli/lint/internalLints/upgrade/patches/**/*',\n ],\n });\n\n if (!tsFileNames.length) {\n return {\n result: 'skip',\n reason: 'no .ts or test.ts files found',\n };\n }\n\n const tsFiles = await fetchFiles(tsFileNames);\n\n const mapped = tsFiles.map(({ file, contents }) => ({\n file,\n before: contents,\n after: replaceAllImports(contents),\n }));\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n mapped.map(async ({ file, after }) => {\n await fs.promises.writeFile(file, after);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const rewriteSrcImports: PatchFunction = async (config) => {\n try {\n return await tryRewriteSrcImports(config);\n } catch (err) {\n log.warn('Failed to rewrite src imports to #src');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,gBAAAA,QAAG,SAAS,SAAS,MAAM,MAAM;AAExD,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEK,MAAM,kCACX;AAEK,MAAM,oBACX;AAEK,MAAM,mBAAmB,CAAC,aAC/B,SAAS;AAAA,EAAQ;AAAA,EAAmB,CAAC,UACnC,MAAM,QAAQ,gBAAgB,SAAS;AACzC;AAEF,MAAM,gCAAgC,CAAC,aACrC,SAAS,QAAQ,iCAAiC,EAAE;AAEtD,MAAM,oBAAoB,CAAC,aACzB,8BAA8B,iBAAiB,QAAQ,CAAC;AAEnD,MAAM,uBAAsC,OAAO;AAAA,EACxD;AACF,MAAgC;AAC9B,QAAM,cAAc,UAAM,uBAAK,CAAC,WAAW,cAAc,GAAG;AAAA,IAC1D,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AAED,MAAI,CAAC,YAAY,QAAQ;AACvB,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,UAAU,MAAM,WAAW,WAAW;AAE5C,QAAM,SAAS,QAAQ,IAAI,CAAC,EAAE,MAAM,SAAS,OAAO;AAAA,IAClD;AAAA,IACA,QAAQ;AAAA,IACR,OAAO,kBAAkB,QAAQ;AAAA,EACnC,EAAE;AAEF,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,OAAO,IAAI,OAAO,EAAE,MAAM,MAAM,MAAM;AACpC,YAAM,gBAAAA,QAAG,SAAS,UAAU,MAAM,KAAK;AAAA,IACzC,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,oBAAmC,OAAO,WAAW;AAChE,MAAI;AACF,WAAO,MAAM,qBAAqB,MAAM;AAAA,EAC1C,SAAS,KAAK;AACZ,uBAAI,KAAK,uCAAuC;AAChD,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
-
"names": ["fs"]
|
|
7
|
-
}
|
|
File without changes
|
/package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.d.ts
RENAMED
|
File without changes
|
/package/lib/cli/lint/internalLints/upgrade/patches/{12.2.0 → 13.0.0}/configureTsConfigForESM.js
RENAMED
|
File without changes
|
|
File without changes
|