@xylabs/ts-scripts-yarn3 3.12.4 → 3.13.0
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/dist/bin/package/clean-outputs.js +2 -1
- package/dist/bin/package/clean-outputs.js.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +2 -1
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.js +2 -1
- package/dist/bin/package/clean-typescript.js.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +2 -1
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.js +2 -1
- package/dist/bin/package/clean.js.map +1 -1
- package/dist/bin/package/clean.mjs +2 -1
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/gen-docs.js +2 -1
- package/dist/bin/package/gen-docs.js.map +1 -1
- package/dist/bin/package/gen-docs.mjs +2 -1
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/xy-ts.js +2 -1
- package/dist/bin/xy-ts.js.map +1 -1
- package/dist/bin/xy-ts.mjs +2 -1
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.js +2 -1
- package/dist/bin/xy.js.map +1 -1
- package/dist/bin/xy.mjs +2 -1
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/lib/createBuildConfig.js.map +1 -1
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/loadConfig.js.map +1 -1
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/processEx.js.map +1 -1
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/withErrnoException.js.map +1 -1
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/withError.js.map +1 -1
- package/dist/lib/withError.mjs.map +1 -1
- package/dist/xy/xy.js +2 -2
- package/dist/xy/xy.js.map +1 -1
- package/dist/xy/xy.mjs +2 -2
- package/dist/xy/xy.mjs.map +1 -1
- package/package.json +6 -5
- package/src/bin/package/clean-outputs.ts +3 -1
- package/src/bin/package/clean-typescript.ts +3 -1
- package/src/bin/package/clean.ts +3 -1
- package/src/bin/package/gen-docs.ts +3 -1
- package/src/bin/xy-ts.ts +3 -1
- package/src/bin/xy.ts +3 -1
- package/src/lib/createBuildConfig.ts +1 -1
- package/src/lib/loadConfig.ts +1 -1
- package/src/lib/processEx.ts +1 -1
- package/src/lib/withErrnoException.ts +2 -2
- package/src/lib/withError.ts +1 -0
- package/src/xy/xy.ts +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
var import_actions = require("../../actions");
|
|
4
|
-
|
|
4
|
+
var import_forget = require("@xylabs/forget");
|
|
5
|
+
(0, import_forget.forget)((0, import_actions.packageCleanOutputs)());
|
|
5
6
|
//# sourceMappingURL=clean-outputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean-outputs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanOutputs } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean-outputs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanOutputs } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageCleanOutputs())\n"],"mappings":";;AAEA,qBAAoC;AAEpC,oBAAuB;AAAA,IAEvB,0BAAO,oCAAoB,CAAC;","names":[]}
|
|
@@ -4,9 +4,10 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
6
|
import { packageCleanOutputs } from "../../actions";
|
|
7
|
+
import { forget } from "@xylabs/forget";
|
|
7
8
|
var require_clean_outputs = __commonJS({
|
|
8
9
|
"src/bin/package/clean-outputs.ts"() {
|
|
9
|
-
packageCleanOutputs();
|
|
10
|
+
forget(packageCleanOutputs());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_clean_outputs();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean-outputs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanOutputs } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean-outputs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanOutputs } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageCleanOutputs())\n"],"mappings":";;;;;AAEA,SAAS,2BAA2B;AAEpC,SAAS,cAAc;AAJvB;AAAA;AAMA,WAAO,oBAAoB,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
var import_actions = require("../../actions");
|
|
4
|
-
|
|
4
|
+
var import_forget = require("@xylabs/forget");
|
|
5
|
+
(0, import_forget.forget)((0, import_actions.packageCleanTypescript)());
|
|
5
6
|
//# sourceMappingURL=clean-typescript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean-typescript.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanTypescript } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean-typescript.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanTypescript } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageCleanTypescript())\n"],"mappings":";;AAEA,qBAAuC;AAEvC,oBAAuB;AAAA,IAEvB,0BAAO,uCAAuB,CAAC;","names":[]}
|
|
@@ -4,9 +4,10 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
6
|
import { packageCleanTypescript } from "../../actions";
|
|
7
|
+
import { forget } from "@xylabs/forget";
|
|
7
8
|
var require_clean_typescript = __commonJS({
|
|
8
9
|
"src/bin/package/clean-typescript.ts"() {
|
|
9
|
-
packageCleanTypescript();
|
|
10
|
+
forget(packageCleanTypescript());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_clean_typescript();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean-typescript.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanTypescript } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean-typescript.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageCleanTypescript } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageCleanTypescript())\n"],"mappings":";;;;;AAEA,SAAS,8BAA8B;AAEvC,SAAS,cAAc;AAJvB;AAAA;AAMA,WAAO,uBAAuB,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
var import_actions = require("../../actions");
|
|
4
|
-
|
|
4
|
+
var import_forget = require("@xylabs/forget");
|
|
5
|
+
(0, import_forget.forget)((0, import_actions.packageClean)());
|
|
5
6
|
//# sourceMappingURL=clean.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageClean } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageClean } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageClean())\n"],"mappings":";;AAEA,qBAA6B;AAE7B,oBAAuB;AAAA,IAEvB,0BAAO,6BAAa,CAAC;","names":[]}
|
|
@@ -4,9 +4,10 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
6
|
import { packageClean } from "../../actions";
|
|
7
|
+
import { forget } from "@xylabs/forget";
|
|
7
8
|
var require_clean = __commonJS({
|
|
8
9
|
"src/bin/package/clean.ts"() {
|
|
9
|
-
packageClean();
|
|
10
|
+
forget(packageClean());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_clean();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/clean.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageClean } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/clean.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageClean } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageClean())\n"],"mappings":";;;;;AAEA,SAAS,oBAAoB;AAE7B,SAAS,cAAc;AAJvB;AAAA;AAMA,WAAO,aAAa,CAAC;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
var import_actions = require("../../actions");
|
|
4
|
-
|
|
4
|
+
var import_forget = require("@xylabs/forget");
|
|
5
|
+
(0, import_forget.forget)((0, import_actions.packageGenDocs)());
|
|
5
6
|
//# sourceMappingURL=gen-docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/gen-docs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageGenDocs } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/gen-docs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageGenDocs } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageGenDocs())\n"],"mappings":";;AAEA,qBAA+B;AAE/B,oBAAuB;AAAA,IAEvB,0BAAO,+BAAe,CAAC;","names":[]}
|
|
@@ -4,9 +4,10 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
6
|
import { packageGenDocs } from "../../actions";
|
|
7
|
+
import { forget } from "@xylabs/forget";
|
|
7
8
|
var require_gen_docs = __commonJS({
|
|
8
9
|
"src/bin/package/gen-docs.ts"() {
|
|
9
|
-
packageGenDocs();
|
|
10
|
+
forget(packageGenDocs());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_gen_docs();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/bin/package/gen-docs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageGenDocs } from '../../actions'\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/bin/package/gen-docs.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { packageGenDocs } from '../../actions'\n\nimport { forget } from '@xylabs/forget'\n\nforget(packageGenDocs())\n"],"mappings":";;;;;AAEA,SAAS,sBAAsB;AAE/B,SAAS,cAAc;AAJvB;AAAA;AAMA,WAAO,eAAe,CAAC;AAAA;AAAA;","names":[]}
|
package/dist/bin/xy-ts.js
CHANGED
package/dist/bin/xy-ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/xy-ts.ts"],"sourcesContent":["#!/usr/bin/env ts-node\n\nimport { xy } from '../xy'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/xy-ts.ts"],"sourcesContent":["#!/usr/bin/env ts-node\n\nimport { forget } from '@xylabs/forget'\n\nimport { xy } from '../xy'\n\nforget(xy())\n"],"mappings":";;AAEA,oBAAuB;AAEvB,gBAAmB;AAAA,IAEnB,0BAAO,cAAG,CAAC;","names":[]}
|
package/dist/bin/xy-ts.mjs
CHANGED
|
@@ -3,10 +3,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
3
3
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
|
+
import { forget } from "@xylabs/forget";
|
|
6
7
|
import { xy } from "../xy";
|
|
7
8
|
var require_xy_ts = __commonJS({
|
|
8
9
|
"src/bin/xy-ts.ts"() {
|
|
9
|
-
xy();
|
|
10
|
+
forget(xy());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_xy_ts();
|
package/dist/bin/xy-ts.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/xy-ts.ts"],"sourcesContent":["#!/usr/bin/env ts-node\n\nimport { xy } from '../xy'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/xy-ts.ts"],"sourcesContent":["#!/usr/bin/env ts-node\n\nimport { forget } from '@xylabs/forget'\n\nimport { xy } from '../xy'\n\nforget(xy())\n"],"mappings":";;;;;AAEA,SAAS,cAAc;AAEvB,SAAS,UAAU;AAJnB;AAAA;AAMA,WAAO,GAAG,CAAC;AAAA;AAAA;","names":[]}
|
package/dist/bin/xy.js
CHANGED
package/dist/bin/xy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { xy } from '../xy'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { forget } from '@xylabs/forget'\n\nimport { xy } from '../xy'\n\nforget(xy())\n"],"mappings":";;AAEA,oBAAuB;AAEvB,gBAAmB;AAAA,IAEnB,0BAAO,cAAG,CAAC;","names":[]}
|
package/dist/bin/xy.mjs
CHANGED
|
@@ -3,10 +3,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
3
3
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
4
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
5
5
|
};
|
|
6
|
+
import { forget } from "@xylabs/forget";
|
|
6
7
|
import { xy } from "../xy";
|
|
7
8
|
var require_xy = __commonJS({
|
|
8
9
|
"src/bin/xy.ts"() {
|
|
9
|
-
xy();
|
|
10
|
+
forget(xy());
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
export default require_xy();
|
package/dist/bin/xy.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { xy } from '../xy'\n\
|
|
1
|
+
{"version":3,"sources":["../../src/bin/xy.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { forget } from '@xylabs/forget'\n\nimport { xy } from '../xy'\n\nforget(xy())\n"],"mappings":";;;;;AAEA,SAAS,cAAc;AAEvB,SAAS,UAAU;AAJnB;AAAA;AAMA,WAAO,GAAG,CAAC;AAAA;AAAA;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -244,7 +244,7 @@ declare const yarn3Only: () => number;
|
|
|
244
244
|
|
|
245
245
|
declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
|
|
246
246
|
|
|
247
|
-
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string,
|
|
247
|
+
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
|
|
248
248
|
|
|
249
249
|
declare const defaultBuildConfig: {
|
|
250
250
|
compilerOptions: {
|
|
@@ -289,7 +289,7 @@ declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
|
|
|
289
289
|
|
|
290
290
|
declare const parsedPackageJSON: (path?: string) => any;
|
|
291
291
|
|
|
292
|
-
declare const processEx: (ex:
|
|
292
|
+
declare const processEx: (ex: unknown) => never;
|
|
293
293
|
|
|
294
294
|
type ScriptStep = [/*command*/ /*command*/ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /*arg*/ /*arg*/ string | string[]] | [/*command*/ string, /*arg*/ /*arg*/ string | string[], /*config*/ SpawnSyncOptionsWithBufferEncoding];
|
|
295
295
|
declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
|
|
@@ -310,7 +310,7 @@ declare const notEmpty: (value?: string | undefined) => boolean;
|
|
|
310
310
|
|
|
311
311
|
declare const union: (a: string[], b: string[]) => Set<string>;
|
|
312
312
|
|
|
313
|
-
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex:
|
|
313
|
+
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
|
|
314
314
|
|
|
315
315
|
declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
|
|
316
316
|
|
|
@@ -332,11 +332,11 @@ type PackageJsonEx = PackageJson & {
|
|
|
332
332
|
};
|
|
333
333
|
declare const loadPackageConfig: () => Promise<PackageJsonEx>;
|
|
334
334
|
|
|
335
|
-
declare const xy: () => {
|
|
335
|
+
declare const xy: () => Promise<{
|
|
336
336
|
[x: string]: unknown;
|
|
337
337
|
_: (string | number)[];
|
|
338
338
|
$0: string;
|
|
339
|
-
} |
|
|
339
|
+
} | {
|
|
340
340
|
[x: string]: unknown;
|
|
341
341
|
_: (string | number)[];
|
|
342
342
|
$0: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -244,7 +244,7 @@ declare const yarn3Only: () => number;
|
|
|
244
244
|
|
|
245
245
|
declare const checkResult: (name: string, result: number, level?: "error" | "warn", exitOnFail?: boolean) => void;
|
|
246
246
|
|
|
247
|
-
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string,
|
|
247
|
+
declare const createBuildConfig: (location: string, module: "ESNext" | "CommonJS", target: "ESNext" | "ES6", outDirSuffix: string) => Record<string, unknown> | undefined;
|
|
248
248
|
|
|
249
249
|
declare const defaultBuildConfig: {
|
|
250
250
|
compilerOptions: {
|
|
@@ -289,7 +289,7 @@ declare const loadConfig: <T extends object>(params?: T) => Promise<T>;
|
|
|
289
289
|
|
|
290
290
|
declare const parsedPackageJSON: (path?: string) => any;
|
|
291
291
|
|
|
292
|
-
declare const processEx: (ex:
|
|
292
|
+
declare const processEx: (ex: unknown) => never;
|
|
293
293
|
|
|
294
294
|
type ScriptStep = [/*command*/ /*command*/ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /*arg*/ /*arg*/ string | string[]] | [/*command*/ string, /*arg*/ /*arg*/ string | string[], /*config*/ SpawnSyncOptionsWithBufferEncoding];
|
|
295
295
|
declare const runSteps: (name: string, steps: ScriptStep[], exitOnFail?: boolean, messages?: string[]) => number;
|
|
@@ -310,7 +310,7 @@ declare const notEmpty: (value?: string | undefined) => boolean;
|
|
|
310
310
|
|
|
311
311
|
declare const union: (a: string[], b: string[]) => Set<string>;
|
|
312
312
|
|
|
313
|
-
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex:
|
|
313
|
+
declare const withErrnoException: <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => number | undefined;
|
|
314
314
|
|
|
315
315
|
declare const withError: <T extends Error = Error>(ex: any, closure: (error: T) => number, predicate?: (ex: T) => boolean) => number | undefined;
|
|
316
316
|
|
|
@@ -332,11 +332,11 @@ type PackageJsonEx = PackageJson & {
|
|
|
332
332
|
};
|
|
333
333
|
declare const loadPackageConfig: () => Promise<PackageJsonEx>;
|
|
334
334
|
|
|
335
|
-
declare const xy: () => {
|
|
335
|
+
declare const xy: () => Promise<{
|
|
336
336
|
[x: string]: unknown;
|
|
337
337
|
_: (string | number)[];
|
|
338
338
|
$0: string;
|
|
339
|
-
} |
|
|
339
|
+
} | {
|
|
340
340
|
[x: string]: unknown;
|
|
341
341
|
_: (string | number)[];
|
|
342
342
|
$0: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/createBuildConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { defaultBuildConfig } from './defaultBuildConfig'\n\nconst getGeneralTypescriptConfig = (location: string) => {\n let generalConfig: string | undefined\n try {\n generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: 'utf8' })\n } catch {\n return false\n }\n return JSON.parse(generalConfig)\n}\n\nexport const createBuildConfig = (\n location: string,\n module: 'ESNext' | 'CommonJS',\n target: 'ESNext' | 'ES6',\n outDirSuffix: string,\n): Record<string,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/createBuildConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { defaultBuildConfig } from './defaultBuildConfig'\n\nconst getGeneralTypescriptConfig = (location: string) => {\n let generalConfig: string | undefined\n try {\n generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: 'utf8' })\n } catch {\n return false\n }\n return JSON.parse(generalConfig)\n}\n\nexport const createBuildConfig = (\n location: string,\n module: 'ESNext' | 'CommonJS',\n target: 'ESNext' | 'ES6',\n outDirSuffix: string,\n): Record<string, unknown> | undefined => {\n const generalConfigObject = getGeneralTypescriptConfig(location)\n if (generalConfigObject === false) {\n return undefined\n }\n return {\n ...generalConfigObject,\n compilerOptions: {\n ...defaultBuildConfig.compilerOptions,\n ...generalConfigObject.compilerOptions,\n module,\n outDir: `./${generalConfigObject.compilerOptions?.outDir ?? 'dist'}/${outDirSuffix}`,\n target,\n },\n exclude: [...(generalConfigObject.exclude ?? []), ...defaultBuildConfig.exclude],\n include: [...(generalConfigObject.include ?? []), ...defaultBuildConfig.include],\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA6B;AAE7B,gCAAmC;AAEnC,MAAM,6BAA6B,CAAC,aAAqB;AACvD,MAAI;AACJ,MAAI;AACF,wBAAgB,6BAAa,GAAG,QAAQ,kBAAkB,EAAE,UAAU,OAAO,CAAC;AAAA,EAChF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO,KAAK,MAAM,aAAa;AACjC;AAEO,MAAM,oBAAoB,CAC/B,UACAA,SACA,QACA,iBACwC;AAnB1C;AAoBE,QAAM,sBAAsB,2BAA2B,QAAQ;AAC/D,MAAI,wBAAwB,OAAO;AACjC,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,iBAAiB;AAAA,MACf,GAAG,6CAAmB;AAAA,MACtB,GAAG,oBAAoB;AAAA,MACvB,QAAAA;AAAA,MACA,QAAQ,OAAK,yBAAoB,oBAApB,mBAAqC,WAAU,MAAM,IAAI,YAAY;AAAA,MAClF;AAAA,IACF;AAAA,IACA,SAAS,CAAC,GAAI,oBAAoB,WAAW,CAAC,GAAI,GAAG,6CAAmB,OAAO;AAAA,IAC/E,SAAS,CAAC,GAAI,oBAAoB,WAAW,CAAC,GAAI,GAAG,6CAAmB,OAAO;AAAA,EACjF;AACF;","names":["module"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/createBuildConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { defaultBuildConfig } from './defaultBuildConfig'\n\nconst getGeneralTypescriptConfig = (location: string) => {\n let generalConfig: string | undefined\n try {\n generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: 'utf8' })\n } catch {\n return false\n }\n return JSON.parse(generalConfig)\n}\n\nexport const createBuildConfig = (\n location: string,\n module: 'ESNext' | 'CommonJS',\n target: 'ESNext' | 'ES6',\n outDirSuffix: string,\n): Record<string,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/createBuildConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs'\n\nimport { defaultBuildConfig } from './defaultBuildConfig'\n\nconst getGeneralTypescriptConfig = (location: string) => {\n let generalConfig: string | undefined\n try {\n generalConfig = readFileSync(`${location}/tsconfig.json`, { encoding: 'utf8' })\n } catch {\n return false\n }\n return JSON.parse(generalConfig)\n}\n\nexport const createBuildConfig = (\n location: string,\n module: 'ESNext' | 'CommonJS',\n target: 'ESNext' | 'ES6',\n outDirSuffix: string,\n): Record<string, unknown> | undefined => {\n const generalConfigObject = getGeneralTypescriptConfig(location)\n if (generalConfigObject === false) {\n return undefined\n }\n return {\n ...generalConfigObject,\n compilerOptions: {\n ...defaultBuildConfig.compilerOptions,\n ...generalConfigObject.compilerOptions,\n module,\n outDir: `./${generalConfigObject.compilerOptions?.outDir ?? 'dist'}/${outDirSuffix}`,\n target,\n },\n exclude: [...(generalConfigObject.exclude ?? []), ...defaultBuildConfig.exclude],\n include: [...(generalConfigObject.include ?? []), ...defaultBuildConfig.include],\n }\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,0BAA0B;AAEnC,MAAM,6BAA6B,CAAC,aAAqB;AACvD,MAAI;AACJ,MAAI;AACF,oBAAgB,aAAa,GAAG,QAAQ,kBAAkB,EAAE,UAAU,OAAO,CAAC;AAAA,EAChF,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO,KAAK,MAAM,aAAa;AACjC;AAEO,MAAM,oBAAoB,CAC/B,UACA,QACA,QACA,iBACwC;AAnB1C;AAoBE,QAAM,sBAAsB,2BAA2B,QAAQ;AAC/D,MAAI,wBAAwB,OAAO;AACjC,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,iBAAiB;AAAA,MACf,GAAG,mBAAmB;AAAA,MACtB,GAAG,oBAAoB;AAAA,MACvB;AAAA,MACA,QAAQ,OAAK,yBAAoB,oBAApB,mBAAqC,WAAU,MAAM,IAAI,YAAY;AAAA,MAClF;AAAA,IACF;AAAA,IACA,SAAS,CAAC,GAAI,oBAAoB,WAAW,CAAC,GAAI,GAAG,mBAAmB,OAAO;AAAA,IAC/E,SAAS,CAAC,GAAI,oBAAoB,WAAW,CAAC,GAAI,GAAG,mBAAmB,OAAO;AAAA,EACjF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport merge from 'lodash/merge'\n\nlet config: Record<string,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport merge from 'lodash/merge'\n\nlet config: Record<string, unknown>\n\nexport const loadConfig = async <T extends object>(params?: T): Promise<T> => {\n if (config) {\n return merge({}, config, params)\n }\n\n const cosmicConfigResult = await cosmiconfig('xy', { cache: true }).search()\n config = cosmicConfigResult?.config\n const configFilePath = cosmicConfigResult?.filepath\n if (configFilePath) {\n console.log(chalk.gray(`Loading config from ${configFilePath}`))\n }\n return merge({}, config, params)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,yBAA4B;AAE5B,mBAAkB;AAElB,IAAI;AAEG,MAAM,aAAa,OAAyB,WAA2B;AAC5E,MAAI,QAAQ;AACV,eAAO,aAAAA,SAAM,CAAC,GAAG,QAAQ,MAAM;AAAA,EACjC;AAEA,QAAM,qBAAqB,UAAM,gCAAY,MAAM,EAAE,OAAO,KAAK,CAAC,EAAE,OAAO;AAC3E,WAAS,yDAAoB;AAC7B,QAAM,iBAAiB,yDAAoB;AAC3C,MAAI,gBAAgB;AAClB,YAAQ,IAAI,aAAAC,QAAM,KAAK,uBAAuB,cAAc,EAAE,CAAC;AAAA,EACjE;AACA,aAAO,aAAAD,SAAM,CAAC,GAAG,QAAQ,MAAM;AACjC;","names":["merge","chalk"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport merge from 'lodash/merge'\n\nlet config: Record<string,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/loadConfig.ts"],"sourcesContent":["import chalk from 'chalk'\nimport { cosmiconfig } from 'cosmiconfig'\n\nimport merge from 'lodash/merge'\n\nlet config: Record<string, unknown>\n\nexport const loadConfig = async <T extends object>(params?: T): Promise<T> => {\n if (config) {\n return merge({}, config, params)\n }\n\n const cosmicConfigResult = await cosmiconfig('xy', { cache: true }).search()\n config = cosmicConfigResult?.config\n const configFilePath = cosmicConfigResult?.filepath\n if (configFilePath) {\n console.log(chalk.gray(`Loading config from ${configFilePath}`))\n }\n return merge({}, config, params)\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAClB,SAAS,mBAAmB;AAE5B,OAAO,WAAW;AAElB,IAAI;AAEG,MAAM,aAAa,OAAyB,WAA2B;AAC5E,MAAI,QAAQ;AACV,WAAO,MAAM,CAAC,GAAG,QAAQ,MAAM;AAAA,EACjC;AAEA,QAAM,qBAAqB,MAAM,YAAY,MAAM,EAAE,OAAO,KAAK,CAAC,EAAE,OAAO;AAC3E,WAAS,yDAAoB;AAC7B,QAAM,iBAAiB,yDAAoB;AAC3C,MAAI,gBAAgB;AAClB,YAAQ,IAAI,MAAM,KAAK,uBAAuB,cAAc,EAAE,CAAC;AAAA,EACjE;AACA,SAAO,MAAM,CAAC,GAAG,QAAQ,MAAM;AACjC;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/processEx.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException'\nimport { withError } from './withError'\n\nexport const processEx = (ex:
|
|
1
|
+
{"version":3,"sources":["../../src/lib/processEx.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException'\nimport { withError } from './withError'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode =\n withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n }) ??\n withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n }) ??\n (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n //This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,gCAAmC;AACnC,uBAA0B;AAEnB,MAAM,YAAY,CAAC,OAAgB;AACxC,QAAM,QAAQ,OAAO,OAAO,WAAW,IAAI,MAAM,EAAE,IAAI;AACvD,QAAM,eACJ,8CAAmB,OAAO,CAACA,WAAU;AACnC,QAAIA,OAAM,SAAS,UAAU;AAC3B,cAAQ,MAAM,aAAAC,QAAM,IAAI,IAAID,OAAM,IAAI,cAAc,CAAC;AAAA,IACvD,OAAO;AACL,cAAQ,MAAM,aAAAC,QAAM,IAAI,UAAUD,OAAM,IAAI,EAAE,CAAC;AAAA,IACjD;AACA,WAAOA,OAAM,SAAS;AAAA,EACxB,CAAC,SACD,4BAAU,OAAO,CAACA,WAAU;AAC1B,YAAQ,MAAM,aAAAC,QAAM,IAAI,GAAGD,OAAM,IAAI,KAAKA,OAAM,OAAO,EAAE,CAAC;AAC1D,WAAO;AAAA,EACT,CAAC,MACA,MAAM;AACL,YAAQ,MAAM,aAAAC,QAAM,IAAI,qBAAqB,KAAK,UAAU,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;AAC3E,WAAO;AAAA,EACT,GAAG;AAEL,UAAQ,KAAK,QAAQ,YAAY,QAAQ;AAC3C;","names":["error","chalk"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/processEx.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException'\nimport { withError } from './withError'\n\nexport const processEx = (ex:
|
|
1
|
+
{"version":3,"sources":["../../src/lib/processEx.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException'\nimport { withError } from './withError'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode =\n withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n }) ??\n withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n }) ??\n (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n //This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAElB,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAEnB,MAAM,YAAY,CAAC,OAAgB;AACxC,QAAM,QAAQ,OAAO,OAAO,WAAW,IAAI,MAAM,EAAE,IAAI;AACvD,QAAM,WACJ,mBAAmB,OAAO,CAACA,WAAU;AACnC,QAAIA,OAAM,SAAS,UAAU;AAC3B,cAAQ,MAAM,MAAM,IAAI,IAAIA,OAAM,IAAI,cAAc,CAAC;AAAA,IACvD,OAAO;AACL,cAAQ,MAAM,MAAM,IAAI,UAAUA,OAAM,IAAI,EAAE,CAAC;AAAA,IACjD;AACA,WAAOA,OAAM,SAAS;AAAA,EACxB,CAAC,KACD,UAAU,OAAO,CAACA,WAAU;AAC1B,YAAQ,MAAM,MAAM,IAAI,GAAGA,OAAM,IAAI,KAAKA,OAAM,OAAO,EAAE,CAAC;AAC1D,WAAO;AAAA,EACT,CAAC,MACA,MAAM;AACL,YAAQ,MAAM,MAAM,IAAI,qBAAqB,KAAK,UAAU,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;AAC3E,WAAO;AAAA,EACT,GAAG;AAEL,UAAQ,KAAK,QAAQ,YAAY,QAAQ;AAC3C;","names":["error"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/withErrnoException.ts"],"sourcesContent":["import { withError } from './withError'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex:
|
|
1
|
+
{"version":3,"sources":["../../src/lib/withErrnoException.ts"],"sourcesContent":["import { withError } from './withError'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAEnB,MAAM,qBAAqB,CAA0D,IAAa,YAAkC;AACzI,aAAO,4BAAa,IAAI,SAAS,CAACA,QAAiBA,IAA6B,UAAU,MAAS;AACrG;","names":["ex"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/withErrnoException.ts"],"sourcesContent":["import { withError } from './withError'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex:
|
|
1
|
+
{"version":3,"sources":["../../src/lib/withErrnoException.ts"],"sourcesContent":["import { withError } from './withError'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n"],"mappings":"AAAA,SAAS,iBAAiB;AAEnB,MAAM,qBAAqB,CAA0D,IAAa,YAAkC;AACzI,SAAO,UAAa,IAAI,SAAS,CAACA,QAAiBA,IAA6B,UAAU,MAAS;AACrG;","names":["ex"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/withError.ts"],"sourcesContent":["export const withError = <T extends Error = Error>(\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/withError.ts"],"sourcesContent":["export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY,CAEvB,IACA,SACA,YAAY,CAACA,QAAUA,IAAG,SAAS,UAAaA,IAAG,YAAY,WAC5D;AACH,SAAO,UAAU,EAAO,IAAI,QAAQ,EAAO,IAAI;AACjD;","names":["ex"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/withError.ts"],"sourcesContent":["export const withError = <T extends Error = Error>(\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n"],"mappings":"AAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"sources":["../../src/lib/withError.ts"],"sourcesContent":["export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n"],"mappings":"AAAO,MAAM,YAAY,CAEvB,IACA,SACA,YAAY,CAACA,QAAUA,IAAG,SAAS,UAAaA,IAAG,YAAY,WAC5D;AACH,SAAO,UAAU,EAAO,IAAI,QAAQ,EAAO,IAAI;AACjD;","names":["ex"]}
|
package/dist/xy/xy.js
CHANGED
|
@@ -38,9 +38,9 @@ var import_xyDeployCommands = require("./xyDeployCommands");
|
|
|
38
38
|
var import_xyInstallCommands = require("./xyInstallCommands");
|
|
39
39
|
var import_xyLintCommands = require("./xyLintCommands");
|
|
40
40
|
var import_xyParseOptions = require("./xyParseOptions");
|
|
41
|
-
const xy = () => {
|
|
41
|
+
const xy = async () => {
|
|
42
42
|
const options = (0, import_xyParseOptions.xyParseOptions)();
|
|
43
|
-
return (0, import_xyBuildCommands.xyBuildCommands)((0, import_xyCommonCommands.xyCommonCommands)((0, import_xyInstallCommands.xyInstallCommands)((0, import_xyDeployCommands.xyDeployCommands)((0, import_xyLintCommands.xyLintCommands)(options))))).demandCommand(1).command("*", "", () => {
|
|
43
|
+
return await (0, import_xyBuildCommands.xyBuildCommands)((0, import_xyCommonCommands.xyCommonCommands)((0, import_xyInstallCommands.xyInstallCommands)((0, import_xyDeployCommands.xyDeployCommands)((0, import_xyLintCommands.xyLintCommands)(options))))).demandCommand(1).command("*", "", () => {
|
|
44
44
|
console.error(import_chalk.default.yellow(`Command not found [${import_chalk.default.magenta(process.argv[2])}]`));
|
|
45
45
|
console.log(import_chalk.default.gray("Try 'yarn xy --help' for list of commands"));
|
|
46
46
|
}).version().help().argv;
|
package/dist/xy/xy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/xy/xy.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { xyBuildCommands } from './xyBuildCommands'\nimport { xyCommonCommands } from './xyCommonCommands'\nimport { xyDeployCommands } from './xyDeployCommands'\nimport { xyInstallCommands } from './xyInstallCommands'\nimport { xyLintCommands } from './xyLintCommands'\nimport { xyParseOptions } from './xyParseOptions'\n\nexport const xy = () => {\n const options = xyParseOptions()\n return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .version()\n .help().argv\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,6BAAgC;AAChC,8BAAiC;AACjC,8BAAiC;AACjC,+BAAkC;AAClC,4BAA+B;AAC/B,4BAA+B;AAExB,MAAM,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../src/xy/xy.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { xyBuildCommands } from './xyBuildCommands'\nimport { xyCommonCommands } from './xyCommonCommands'\nimport { xyDeployCommands } from './xyDeployCommands'\nimport { xyInstallCommands } from './xyInstallCommands'\nimport { xyLintCommands } from './xyLintCommands'\nimport { xyParseOptions } from './xyParseOptions'\n\nexport const xy = async () => {\n const options = xyParseOptions()\n return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .version()\n .help().argv\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,6BAAgC;AAChC,8BAAiC;AACjC,8BAAiC;AACjC,+BAAkC;AAClC,4BAA+B;AAC/B,4BAA+B;AAExB,MAAM,KAAK,YAAY;AAC5B,QAAM,cAAU,sCAAe;AAC/B,SAAO,UAAM,4CAAgB,8CAAiB,gDAAkB,8CAAiB,sCAAe,OAAO,CAAC,CAAC,CAAC,CAAC,EACxG,cAAc,CAAC,EACf,QAAQ,KAAK,IAAI,MAAM;AACtB,YAAQ,MAAM,aAAAA,QAAM,OAAO,sBAAsB,aAAAA,QAAM,QAAQ,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACnF,YAAQ,IAAI,aAAAA,QAAM,KAAK,2CAA2C,CAAC;AAAA,EACrE,CAAC,EACA,QAAQ,EACR,KAAK,EAAE;AACZ;","names":["chalk"]}
|
package/dist/xy/xy.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { xyDeployCommands } from "./xyDeployCommands";
|
|
|
5
5
|
import { xyInstallCommands } from "./xyInstallCommands";
|
|
6
6
|
import { xyLintCommands } from "./xyLintCommands";
|
|
7
7
|
import { xyParseOptions } from "./xyParseOptions";
|
|
8
|
-
const xy = () => {
|
|
8
|
+
const xy = async () => {
|
|
9
9
|
const options = xyParseOptions();
|
|
10
|
-
return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
10
|
+
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
11
11
|
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`));
|
|
12
12
|
console.log(chalk.gray("Try 'yarn xy --help' for list of commands"));
|
|
13
13
|
}).version().help().argv;
|
package/dist/xy/xy.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/xy/xy.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { xyBuildCommands } from './xyBuildCommands'\nimport { xyCommonCommands } from './xyCommonCommands'\nimport { xyDeployCommands } from './xyDeployCommands'\nimport { xyInstallCommands } from './xyInstallCommands'\nimport { xyLintCommands } from './xyLintCommands'\nimport { xyParseOptions } from './xyParseOptions'\n\nexport const xy = () => {\n const options = xyParseOptions()\n return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .version()\n .help().argv\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAElB,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAExB,MAAM,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../src/xy/xy.ts"],"sourcesContent":["import chalk from 'chalk'\n\nimport { xyBuildCommands } from './xyBuildCommands'\nimport { xyCommonCommands } from './xyCommonCommands'\nimport { xyDeployCommands } from './xyDeployCommands'\nimport { xyInstallCommands } from './xyInstallCommands'\nimport { xyLintCommands } from './xyLintCommands'\nimport { xyParseOptions } from './xyParseOptions'\n\nexport const xy = async () => {\n const options = xyParseOptions()\n return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))\n .demandCommand(1)\n .command('*', '', () => {\n console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))\n console.log(chalk.gray(\"Try 'yarn xy --help' for list of commands\"))\n })\n .version()\n .help().argv\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAElB,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAExB,MAAM,KAAK,YAAY;AAC5B,QAAM,UAAU,eAAe;AAC/B,SAAO,MAAM,gBAAgB,iBAAiB,kBAAkB,iBAAiB,eAAe,OAAO,CAAC,CAAC,CAAC,CAAC,EACxG,cAAc,CAAC,EACf,QAAQ,KAAK,IAAI,MAAM;AACtB,YAAQ,MAAM,MAAM,OAAO,sBAAsB,MAAM,QAAQ,QAAQ,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACnF,YAAQ,IAAI,MAAM,KAAK,2CAA2C,CAAC;AAAA,EACrE,CAAC,EACA,QAAQ,EACR,KAAK,EAAE;AACZ;","names":[]}
|
package/package.json
CHANGED
|
@@ -65,8 +65,9 @@
|
|
|
65
65
|
"@types/yargs": "^17.0.32",
|
|
66
66
|
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
67
67
|
"@typescript-eslint/parser": "^7.16.1",
|
|
68
|
-
"@xylabs/
|
|
69
|
-
"@xylabs/tsconfig
|
|
68
|
+
"@xylabs/forget": "^3.6.5",
|
|
69
|
+
"@xylabs/tsconfig": "^3.13.0",
|
|
70
|
+
"@xylabs/tsconfig-dom": "^3.13.0",
|
|
70
71
|
"async-mutex": "^0.5.0",
|
|
71
72
|
"chalk": "^4.1.2",
|
|
72
73
|
"cosmiconfig": "^9.0.0",
|
|
@@ -114,8 +115,8 @@
|
|
|
114
115
|
"@types/license-checker": "^25.0.6",
|
|
115
116
|
"@types/lodash": "^4.17.7",
|
|
116
117
|
"@types/parse-git-config": "^3.0.4",
|
|
117
|
-
"@xylabs/eslint-config": "^3.
|
|
118
|
-
"@xylabs/tsconfig": "^3.
|
|
118
|
+
"@xylabs/eslint-config": "^3.13.0",
|
|
119
|
+
"@xylabs/tsconfig": "^3.13.0",
|
|
119
120
|
"publint": "^0.2.9",
|
|
120
121
|
"typescript": "^5.5.3"
|
|
121
122
|
},
|
|
@@ -168,6 +169,6 @@
|
|
|
168
169
|
"package-clean": "echo Not cleaning..."
|
|
169
170
|
},
|
|
170
171
|
"sideEffects": false,
|
|
171
|
-
"version": "3.
|
|
172
|
+
"version": "3.13.0",
|
|
172
173
|
"type": "commonjs"
|
|
173
174
|
}
|
package/src/bin/package/clean.ts
CHANGED
package/src/bin/xy-ts.ts
CHANGED
package/src/bin/xy.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const createBuildConfig = (
|
|
|
17
17
|
module: 'ESNext' | 'CommonJS',
|
|
18
18
|
target: 'ESNext' | 'ES6',
|
|
19
19
|
outDirSuffix: string,
|
|
20
|
-
): Record<string,
|
|
20
|
+
): Record<string, unknown> | undefined => {
|
|
21
21
|
const generalConfigObject = getGeneralTypescriptConfig(location)
|
|
22
22
|
if (generalConfigObject === false) {
|
|
23
23
|
return undefined
|
package/src/lib/loadConfig.ts
CHANGED
package/src/lib/processEx.ts
CHANGED
|
@@ -3,7 +3,7 @@ import chalk from 'chalk'
|
|
|
3
3
|
import { withErrnoException } from './withErrnoException'
|
|
4
4
|
import { withError } from './withError'
|
|
5
5
|
|
|
6
|
-
export const processEx = (ex:
|
|
6
|
+
export const processEx = (ex: unknown) => {
|
|
7
7
|
const error = typeof ex === 'string' ? new Error(ex) : ex
|
|
8
8
|
const exitCode =
|
|
9
9
|
withErrnoException(error, (error) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withError } from './withError'
|
|
2
2
|
|
|
3
|
-
export const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex:
|
|
4
|
-
return withError<T>(ex, closure, (ex:
|
|
3
|
+
export const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {
|
|
4
|
+
return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)
|
|
5
5
|
}
|
package/src/lib/withError.ts
CHANGED
package/src/xy/xy.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { xyInstallCommands } from './xyInstallCommands'
|
|
|
7
7
|
import { xyLintCommands } from './xyLintCommands'
|
|
8
8
|
import { xyParseOptions } from './xyParseOptions'
|
|
9
9
|
|
|
10
|
-
export const xy = () => {
|
|
10
|
+
export const xy = async () => {
|
|
11
11
|
const options = xyParseOptions()
|
|
12
|
-
return xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))
|
|
12
|
+
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options)))))
|
|
13
13
|
.demandCommand(1)
|
|
14
14
|
.command('*', '', () => {
|
|
15
15
|
console.error(chalk.yellow(`Command not found [${chalk.magenta(process.argv[2])}]`))
|