skuba 10.2.0-config-20250421024010 → 11.0.0-feat-npmrc-to-workspace-20250511013825
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/README.md +0 -3
- package/lib/api/github/issueComment.d.ts +4 -2
- package/lib/api/github/issueComment.js +13 -0
- package/lib/api/github/issueComment.js.map +2 -2
- package/lib/cli/build/assets.js +3 -9
- package/lib/cli/build/assets.js.map +2 -2
- package/lib/cli/configure/processing/configFile.d.ts +2 -2
- package/lib/cli/configure/processing/configFile.js +18 -21
- package/lib/cli/configure/processing/configFile.js.map +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +1 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +6 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +26 -22
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +5 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +167 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +0 -9
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +2 -2
- package/lib/cli/test/index.js +1 -0
- package/lib/cli/test/index.js.map +2 -2
- package/lib/utils/copy.js +1 -1
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.d.ts +10 -0
- package/lib/utils/dir.js +74 -2
- package/lib/utils/dir.js.map +3 -3
- package/lib/utils/npmrc.d.ts +0 -1
- package/lib/utils/npmrc.js +0 -3
- package/lib/utils/npmrc.js.map +2 -2
- package/package.json +12 -12
- package/template/base/_.gitignore +2 -0
- package/template/base/_pnpm-workspace.yaml +10 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +9 -18
- package/template/express-rest-api/Dockerfile.dev-deps +4 -3
- package/template/express-rest-api/package.json +1 -1
- package/template/greeter/.buildkite/pipeline.yml +5 -14
- package/template/greeter/Dockerfile +4 -3
- package/template/greeter/package.json +2 -2
- package/template/koa-rest-api/.buildkite/pipeline.yml +9 -18
- package/template/koa-rest-api/Dockerfile.dev-deps +4 -3
- package/template/koa-rest-api/package.json +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +9 -18
- package/template/lambda-sqs-worker-cdk/Dockerfile +4 -3
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +7 -0
- package/template/lambda-sqs-worker-cdk/package.json +3 -2
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -3
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +5 -8
- package/template/oss-npm-package/_package.json +2 -2
- package/template/private-npm-package/_package.json +1 -1
- package/config/index.d.ts +0 -1
- package/config/index.js +0 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js +0 -95
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js.map +0 -7
- package/lib/config/index.d.ts +0 -1
- package/lib/config/index.js +0 -29
- package/lib/config/index.js.map +0 -7
- package/lib/config/load.d.ts +0 -2
- package/lib/config/load.js +0 -75
- package/lib/config/load.js.map +0 -7
- package/lib/config/types.d.ts +0 -51
- package/lib/config/types.js +0 -74
- package/lib/config/types.js.map +0 -7
- package/template/base/_.npmrc +0 -9
package/lib/config/load.js
DELETED
|
@@ -1,75 +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 load_exports = {};
|
|
30
|
-
__export(load_exports, {
|
|
31
|
-
loadSkubaConfig: () => loadSkubaConfig
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(load_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
36
|
-
var import_jiti = require("jiti");
|
|
37
|
-
var import_logging = require("../utils/logging");
|
|
38
|
-
var import_types = require("./types");
|
|
39
|
-
const CONFIG_FILENAME = "skuba.config.ts";
|
|
40
|
-
const jiti = (0, import_jiti.createJiti)(__filename);
|
|
41
|
-
const skubaConfigCacheForPath = {};
|
|
42
|
-
const findSkubaConfig = async (cwd) => {
|
|
43
|
-
let currentDir = cwd;
|
|
44
|
-
while (currentDir !== import_path.default.dirname(currentDir)) {
|
|
45
|
-
const filePath = import_path.default.join(currentDir, CONFIG_FILENAME);
|
|
46
|
-
const pathExists = await import_fs_extra.default.pathExists(filePath);
|
|
47
|
-
if (pathExists) {
|
|
48
|
-
return filePath;
|
|
49
|
-
}
|
|
50
|
-
currentDir = import_path.default.dirname(currentDir);
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
};
|
|
54
|
-
const loadSkubaConfig = (cwd = process.cwd()) => {
|
|
55
|
-
const load = async () => {
|
|
56
|
-
const configPath = await findSkubaConfig(cwd);
|
|
57
|
-
if (!configPath) {
|
|
58
|
-
return {};
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
const rawConfig = await jiti.import(configPath);
|
|
62
|
-
return import_types.skubaConfigSchema.parse(rawConfig);
|
|
63
|
-
} catch (err) {
|
|
64
|
-
import_logging.log.warn(`Failed to load ${import_logging.log.bold(configPath)}.`);
|
|
65
|
-
import_logging.log.subtle(err);
|
|
66
|
-
return {};
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
return skubaConfigCacheForPath[cwd] ??= load();
|
|
70
|
-
};
|
|
71
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
-
0 && (module.exports = {
|
|
73
|
-
loadSkubaConfig
|
|
74
|
-
});
|
|
75
|
-
//# sourceMappingURL=load.js.map
|
package/lib/config/load.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/config/load.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport fs from 'fs-extra';\nimport { createJiti } from 'jiti';\n\nimport { log } from '../utils/logging';\n\nimport { type SkubaConfig, skubaConfigSchema } from './types';\n\nconst CONFIG_FILENAME = 'skuba.config.ts';\n\nconst jiti = createJiti(__filename);\n\nconst skubaConfigCacheForPath: Record<string, Promise<SkubaConfig>> = {};\n\nconst findSkubaConfig = async (cwd: string): Promise<string | null> => {\n let currentDir = cwd;\n\n while (currentDir !== path.dirname(currentDir)) {\n const filePath = path.join(currentDir, CONFIG_FILENAME);\n const pathExists = await fs.pathExists(filePath);\n\n if (pathExists) {\n return filePath;\n }\n\n currentDir = path.dirname(currentDir);\n }\n\n return null;\n};\n\nexport const loadSkubaConfig = (\n cwd: string = process.cwd(),\n): Promise<SkubaConfig> => {\n const load = async (): Promise<SkubaConfig> => {\n const configPath = await findSkubaConfig(cwd);\n if (!configPath) {\n return {};\n }\n\n try {\n const rawConfig = await jiti.import(configPath);\n return skubaConfigSchema.parse(rawConfig);\n } catch (err) {\n log.warn(`Failed to load ${log.bold(configPath)}.`);\n log.subtle(err);\n\n return {};\n }\n };\n\n return (skubaConfigCacheForPath[cwd] ??= load());\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAe;AACf,kBAA2B;AAE3B,qBAAoB;AAEpB,mBAAoD;AAEpD,MAAM,kBAAkB;AAExB,MAAM,WAAO,wBAAW,UAAU;AAElC,MAAM,0BAAgE,CAAC;AAEvE,MAAM,kBAAkB,OAAO,QAAwC;AACrE,MAAI,aAAa;AAEjB,SAAO,eAAe,YAAAA,QAAK,QAAQ,UAAU,GAAG;AAC9C,UAAM,WAAW,YAAAA,QAAK,KAAK,YAAY,eAAe;AACtD,UAAM,aAAa,MAAM,gBAAAC,QAAG,WAAW,QAAQ;AAE/C,QAAI,YAAY;AACd,aAAO;AAAA,IACT;AAEA,iBAAa,YAAAD,QAAK,QAAQ,UAAU;AAAA,EACtC;AAEA,SAAO;AACT;AAEO,MAAM,kBAAkB,CAC7B,MAAc,QAAQ,IAAI,MACD;AACzB,QAAM,OAAO,YAAkC;AAC7C,UAAM,aAAa,MAAM,gBAAgB,GAAG;AAC5C,QAAI,CAAC,YAAY;AACf,aAAO,CAAC;AAAA,IACV;AAEA,QAAI;AACF,YAAM,YAAY,MAAM,KAAK,OAAO,UAAU;AAC9C,aAAO,+BAAkB,MAAM,SAAS;AAAA,IAC1C,SAAS,KAAK;AACZ,yBAAI,KAAK,kBAAkB,mBAAI,KAAK,UAAU,CAAC,GAAG;AAClD,yBAAI,OAAO,GAAG;AAEd,aAAO,CAAC;AAAA,IACV;AAAA,EACF;AAEA,SAAQ,wBAAwB,GAAG,MAAM,KAAK;AAChD;",
|
|
6
|
-
"names": ["path", "fs"]
|
|
7
|
-
}
|
package/lib/config/types.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const skubaConfigSchema: z.ZodObject<{
|
|
3
|
-
/**
|
|
4
|
-
* Files to copy from the working directory to the output directory after
|
|
5
|
-
* compilation. This feature is useful to bundle non-JavaScript assets in an
|
|
6
|
-
* npm package, back-end deployment package or container image.
|
|
7
|
-
*
|
|
8
|
-
* Supports `picomatch` glob patterns with dotfile matching.
|
|
9
|
-
*
|
|
10
|
-
* - https://github.com/micromatch/picomatch#globbing-features
|
|
11
|
-
* - https://github.com/micromatch/picomatch#picomatch-options
|
|
12
|
-
*
|
|
13
|
-
* Commands:
|
|
14
|
-
*
|
|
15
|
-
* - `skuba build`
|
|
16
|
-
* - `skuba build-package`
|
|
17
|
-
*/
|
|
18
|
-
assets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
-
/**
|
|
20
|
-
* The entry point to the package or application. For packages, this is the
|
|
21
|
-
* main file that will be imported when the package is required. For applications,
|
|
22
|
-
* this is the main file that will be executed when the application is run.
|
|
23
|
-
*
|
|
24
|
-
* Commands:
|
|
25
|
-
*
|
|
26
|
-
* - `skuba build`
|
|
27
|
-
* - `skuba build-package`
|
|
28
|
-
* - `skuba start`
|
|
29
|
-
*/
|
|
30
|
-
entryPoint: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
entryPoint?: string | undefined;
|
|
33
|
-
assets?: string[] | undefined;
|
|
34
|
-
}, {
|
|
35
|
-
entryPoint?: string | undefined;
|
|
36
|
-
assets?: string[] | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
export declare const SkubaConfig: {
|
|
39
|
-
assets: {
|
|
40
|
-
/**
|
|
41
|
-
* The default list of `assets` that are applied if your project does not
|
|
42
|
-
* specify the configuration property.
|
|
43
|
-
*
|
|
44
|
-
* Currently includes:
|
|
45
|
-
*
|
|
46
|
-
* - JSON translation files for https://github.com/seek-oss/vocab
|
|
47
|
-
*/
|
|
48
|
-
default: string[];
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export type SkubaConfig = z.infer<typeof skubaConfigSchema>;
|
package/lib/config/types.js
DELETED
|
@@ -1,74 +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 types_exports = {};
|
|
20
|
-
__export(types_exports, {
|
|
21
|
-
SkubaConfig: () => SkubaConfig,
|
|
22
|
-
skubaConfigSchema: () => skubaConfigSchema
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(types_exports);
|
|
25
|
-
var import_zod = require("zod");
|
|
26
|
-
const skubaConfigSchema = import_zod.z.object({
|
|
27
|
-
/**
|
|
28
|
-
* Files to copy from the working directory to the output directory after
|
|
29
|
-
* compilation. This feature is useful to bundle non-JavaScript assets in an
|
|
30
|
-
* npm package, back-end deployment package or container image.
|
|
31
|
-
*
|
|
32
|
-
* Supports `picomatch` glob patterns with dotfile matching.
|
|
33
|
-
*
|
|
34
|
-
* - https://github.com/micromatch/picomatch#globbing-features
|
|
35
|
-
* - https://github.com/micromatch/picomatch#picomatch-options
|
|
36
|
-
*
|
|
37
|
-
* Commands:
|
|
38
|
-
*
|
|
39
|
-
* - `skuba build`
|
|
40
|
-
* - `skuba build-package`
|
|
41
|
-
*/
|
|
42
|
-
assets: import_zod.z.array(import_zod.z.string()).optional(),
|
|
43
|
-
/**
|
|
44
|
-
* The entry point to the package or application. For packages, this is the
|
|
45
|
-
* main file that will be imported when the package is required. For applications,
|
|
46
|
-
* this is the main file that will be executed when the application is run.
|
|
47
|
-
*
|
|
48
|
-
* Commands:
|
|
49
|
-
*
|
|
50
|
-
* - `skuba build`
|
|
51
|
-
* - `skuba build-package`
|
|
52
|
-
* - `skuba start`
|
|
53
|
-
*/
|
|
54
|
-
entryPoint: import_zod.z.string().optional()
|
|
55
|
-
});
|
|
56
|
-
const SkubaConfig = {
|
|
57
|
-
assets: {
|
|
58
|
-
/**
|
|
59
|
-
* The default list of `assets` that are applied if your project does not
|
|
60
|
-
* specify the configuration property.
|
|
61
|
-
*
|
|
62
|
-
* Currently includes:
|
|
63
|
-
*
|
|
64
|
-
* - JSON translation files for https://github.com/seek-oss/vocab
|
|
65
|
-
*/
|
|
66
|
-
default: ["**/*.vocab/*translations.json"]
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
-
0 && (module.exports = {
|
|
71
|
-
SkubaConfig,
|
|
72
|
-
skubaConfigSchema
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=types.js.map
|
package/lib/config/types.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/config/types.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\n\nexport const skubaConfigSchema = z.object({\n /**\n * Files to copy from the working directory to the output directory after\n * compilation. This feature is useful to bundle non-JavaScript assets in an\n * npm package, back-end deployment package or container image.\n *\n * Supports `picomatch` glob patterns with dotfile matching.\n *\n * - https://github.com/micromatch/picomatch#globbing-features\n * - https://github.com/micromatch/picomatch#picomatch-options\n *\n * Commands:\n *\n * - `skuba build`\n * - `skuba build-package`\n */\n assets: z.array(z.string()).optional(),\n\n /**\n * The entry point to the package or application. For packages, this is the\n * main file that will be imported when the package is required. For applications,\n * this is the main file that will be executed when the application is run.\n *\n * Commands:\n *\n * - `skuba build`\n * - `skuba build-package`\n * - `skuba start`\n */\n entryPoint: z.string().optional(),\n});\n\nexport const SkubaConfig = {\n assets: {\n /**\n * The default list of `assets` that are applied if your project does not\n * specify the configuration property.\n *\n * Currently includes:\n *\n * - JSON translation files for https://github.com/seek-oss/vocab\n */\n default: ['**/*.vocab/*translations.json'],\n },\n};\n\nexport type SkubaConfig = z.infer<typeof skubaConfigSchema>;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAkB;AAEX,MAAM,oBAAoB,aAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBxC,QAAQ,aAAE,MAAM,aAAE,OAAO,CAAC,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAarC,YAAY,aAAE,OAAO,EAAE,SAAS;AAClC,CAAC;AAEM,MAAM,cAAc;AAAA,EACzB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASN,SAAS,CAAC,+BAA+B;AAAA,EAC3C;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/template/base/_.npmrc
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# managed by skuba
|
|
2
|
-
package-manager-strict-version=true
|
|
3
|
-
public-hoist-pattern[]="@types*"
|
|
4
|
-
public-hoist-pattern[]="*eslint*"
|
|
5
|
-
public-hoist-pattern[]="*prettier*"
|
|
6
|
-
public-hoist-pattern[]="esbuild"
|
|
7
|
-
public-hoist-pattern[]="jest"
|
|
8
|
-
public-hoist-pattern[]="tsconfig-seek"
|
|
9
|
-
# end managed by skuba
|