@storm-software/cloudflare-tools 0.54.9 → 0.55.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/{chunk-FRA27Q4O.mjs → chunk-22FI2MXA.mjs} +67 -223
- package/dist/{chunk-J4ZEL2FS.js → chunk-3QOI2KC5.js} +68 -224
- package/dist/{chunk-SXIJ3Y7H.mjs → chunk-EHG4WNC6.mjs} +1 -1
- package/dist/{chunk-UUCB3PD3.js → chunk-EVZKG55X.js} +1 -1
- package/dist/{chunk-PI2GYWCK.js → chunk-HHSRZEGF.js} +2 -2
- package/dist/{chunk-6FLJY5GI.mjs → chunk-ZGKK7MNQ.mjs} +1 -1
- package/dist/executors.js +1 -1
- package/dist/executors.mjs +1 -1
- package/dist/generators.js +3 -3
- package/dist/generators.mjs +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/src/executors/cloudflare-publish/executor.js +1 -1
- package/dist/src/executors/cloudflare-publish/executor.mjs +1 -1
- package/dist/src/executors/serve/executor.js +2 -2
- package/dist/src/executors/serve/executor.mjs +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/dist/src/generators/worker/generator.js +3 -3
- package/dist/src/generators/worker/generator.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -2188,48 +2188,48 @@ var nodeVersion = "20.11.0";
|
|
|
2188
2188
|
var pnpmVersion = "8.10.2";
|
|
2189
2189
|
|
|
2190
2190
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2191
|
-
async function typeScriptLibraryGeneratorFn(tree,
|
|
2192
|
-
const
|
|
2193
|
-
...
|
|
2191
|
+
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
2192
|
+
const normalized = await normalizeOptions(tree, {
|
|
2193
|
+
...options
|
|
2194
2194
|
});
|
|
2195
2195
|
const tasks = [];
|
|
2196
2196
|
tasks.push(await jsInitGenerator(tree, {
|
|
2197
|
-
...
|
|
2198
|
-
tsConfigName:
|
|
2197
|
+
...normalized,
|
|
2198
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
2199
2199
|
}));
|
|
2200
2200
|
tasks.push(addDependenciesToPackageJson(tree, {}, {
|
|
2201
2201
|
"@storm-software/workspace-tools": "latest",
|
|
2202
2202
|
"@storm-software/testing-tools": "latest",
|
|
2203
|
-
...
|
|
2203
|
+
...options.devDependencies ?? {}
|
|
2204
2204
|
}));
|
|
2205
|
-
if (
|
|
2205
|
+
if (normalized.publishable) {
|
|
2206
2206
|
tasks.push(await setupVerdaccio(tree, {
|
|
2207
|
-
...
|
|
2207
|
+
...normalized,
|
|
2208
2208
|
skipFormat: true
|
|
2209
2209
|
}));
|
|
2210
2210
|
}
|
|
2211
2211
|
const projectConfig = {
|
|
2212
|
-
root:
|
|
2212
|
+
root: normalized.directory,
|
|
2213
2213
|
projectType: "library",
|
|
2214
|
-
sourceRoot: joinPaths(
|
|
2214
|
+
sourceRoot: joinPaths(normalized.directory ?? "", "src"),
|
|
2215
2215
|
targets: {
|
|
2216
2216
|
build: {
|
|
2217
|
-
executor:
|
|
2217
|
+
executor: options.buildExecutor,
|
|
2218
2218
|
outputs: [
|
|
2219
2219
|
"{options.outputPath}"
|
|
2220
2220
|
],
|
|
2221
2221
|
options: {
|
|
2222
2222
|
entry: [
|
|
2223
|
-
joinPaths(
|
|
2223
|
+
joinPaths(normalized.projectRoot, "src", "index.ts")
|
|
2224
2224
|
],
|
|
2225
|
-
outputPath: getOutputPath(
|
|
2226
|
-
tsconfig: joinPaths(
|
|
2227
|
-
project: joinPaths(
|
|
2225
|
+
outputPath: getOutputPath(normalized),
|
|
2226
|
+
tsconfig: joinPaths(normalized.projectRoot, "tsconfig.json"),
|
|
2227
|
+
project: joinPaths(normalized.projectRoot, "package.json"),
|
|
2228
2228
|
defaultConfiguration: "production",
|
|
2229
2229
|
platform: "neutral",
|
|
2230
2230
|
assets: [
|
|
2231
2231
|
{
|
|
2232
|
-
input:
|
|
2232
|
+
input: normalized.projectRoot,
|
|
2233
2233
|
glob: "*.md",
|
|
2234
2234
|
output: "/"
|
|
2235
2235
|
},
|
|
@@ -2253,19 +2253,19 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
2255
|
};
|
|
2256
|
-
if (
|
|
2257
|
-
projectConfig.targets.build.options.platform =
|
|
2256
|
+
if (options.platform) {
|
|
2257
|
+
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
2258
2258
|
}
|
|
2259
|
-
addProjectTag(projectConfig, ProjectTagConstants.Platform.TAG_ID,
|
|
2259
|
+
addProjectTag(projectConfig, ProjectTagConstants.Platform.TAG_ID, options.platform === "node" ? ProjectTagConstants.Platform.NODE : options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL, {
|
|
2260
2260
|
overwrite: false
|
|
2261
2261
|
});
|
|
2262
|
-
createProjectTsConfigJson(tree,
|
|
2263
|
-
addProjectConfiguration(tree,
|
|
2262
|
+
createProjectTsConfigJson(tree, normalized);
|
|
2263
|
+
addProjectConfiguration(tree, normalized.name, projectConfig);
|
|
2264
2264
|
let repository = {
|
|
2265
2265
|
type: "github",
|
|
2266
2266
|
url: config?.repository || `https://github.com/${config?.organization || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
2267
2267
|
};
|
|
2268
|
-
let description =
|
|
2268
|
+
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2269
2269
|
if (tree.exists("package.json")) {
|
|
2270
2270
|
const packageJson = readJson(tree, "package.json");
|
|
2271
2271
|
if (packageJson?.repository) {
|
|
@@ -2275,18 +2275,18 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2275
2275
|
description = packageJson.description;
|
|
2276
2276
|
}
|
|
2277
2277
|
}
|
|
2278
|
-
if (!
|
|
2279
|
-
|
|
2278
|
+
if (!normalized.importPath) {
|
|
2279
|
+
normalized.importPath = normalized.name;
|
|
2280
2280
|
}
|
|
2281
|
-
const packageJsonPath = joinPaths(
|
|
2281
|
+
const packageJsonPath = joinPaths(normalized.projectRoot, "package.json");
|
|
2282
2282
|
if (tree.exists(packageJsonPath)) {
|
|
2283
2283
|
updateJson(tree, packageJsonPath, (json) => {
|
|
2284
|
-
if (!
|
|
2285
|
-
|
|
2284
|
+
if (!normalized.importPath) {
|
|
2285
|
+
normalized.importPath = normalized.name;
|
|
2286
2286
|
}
|
|
2287
|
-
json.name =
|
|
2287
|
+
json.name = normalized.importPath;
|
|
2288
2288
|
json.version = "0.0.1";
|
|
2289
|
-
if (json.private && (
|
|
2289
|
+
if (json.private && (normalized.publishable || normalized.rootProject)) {
|
|
2290
2290
|
json.private = void 0;
|
|
2291
2291
|
}
|
|
2292
2292
|
return {
|
|
@@ -2295,7 +2295,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2295
2295
|
description,
|
|
2296
2296
|
repository: {
|
|
2297
2297
|
...repository,
|
|
2298
|
-
directory:
|
|
2298
|
+
directory: normalized.projectRoot
|
|
2299
2299
|
},
|
|
2300
2300
|
type: "module",
|
|
2301
2301
|
dependencies: {
|
|
@@ -2308,37 +2308,37 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2308
2308
|
});
|
|
2309
2309
|
} else {
|
|
2310
2310
|
writeJson(tree, packageJsonPath, {
|
|
2311
|
-
name:
|
|
2311
|
+
name: normalized.importPath,
|
|
2312
2312
|
version: "0.0.1",
|
|
2313
2313
|
description,
|
|
2314
2314
|
repository: {
|
|
2315
2315
|
...repository,
|
|
2316
|
-
directory:
|
|
2316
|
+
directory: normalized.projectRoot
|
|
2317
2317
|
},
|
|
2318
|
-
private: !
|
|
2318
|
+
private: !normalized.publishable || normalized.rootProject,
|
|
2319
2319
|
type: "module",
|
|
2320
2320
|
publishConfig: {
|
|
2321
2321
|
access: "public"
|
|
2322
2322
|
}
|
|
2323
2323
|
});
|
|
2324
2324
|
}
|
|
2325
|
-
if (tree.exists("package.json") &&
|
|
2325
|
+
if (tree.exists("package.json") && normalized.importPath) {
|
|
2326
2326
|
updateJson(tree, "package.json", (json) => ({
|
|
2327
2327
|
...json,
|
|
2328
2328
|
pnpm: {
|
|
2329
2329
|
...json?.pnpm,
|
|
2330
2330
|
overrides: {
|
|
2331
2331
|
...json?.pnpm?.overrides,
|
|
2332
|
-
[
|
|
2332
|
+
[normalized.importPath ?? ""]: "workspace:*"
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
2335
|
}));
|
|
2336
2336
|
}
|
|
2337
|
-
addTsConfigPath(tree,
|
|
2338
|
-
joinPaths(
|
|
2337
|
+
addTsConfigPath(tree, normalized.importPath, [
|
|
2338
|
+
joinPaths(normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2339
2339
|
]);
|
|
2340
|
-
addTsConfigPath(tree, joinPaths(
|
|
2341
|
-
joinPaths(
|
|
2340
|
+
addTsConfigPath(tree, joinPaths(normalized.importPath, "/*"), [
|
|
2341
|
+
joinPaths(normalized.projectRoot, "./src", "/*")
|
|
2342
2342
|
]);
|
|
2343
2343
|
if (tree.exists("package.json")) {
|
|
2344
2344
|
const packageJson = readJson(tree, "package.json");
|
|
@@ -2349,7 +2349,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2349
2349
|
description = packageJson.description;
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
|
-
const tsconfigPath = joinPaths(
|
|
2352
|
+
const tsconfigPath = joinPaths(normalized.projectRoot, "tsconfig.json");
|
|
2353
2353
|
if (tree.exists(tsconfigPath)) {
|
|
2354
2354
|
updateJson(tree, tsconfigPath, (json) => {
|
|
2355
2355
|
json.composite ??= true;
|
|
@@ -2357,10 +2357,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2357
2357
|
});
|
|
2358
2358
|
} else {
|
|
2359
2359
|
writeJson(tree, tsconfigPath, {
|
|
2360
|
-
extends: `${offsetFromRoot(
|
|
2360
|
+
extends: `${offsetFromRoot(normalized.projectRoot)}tsconfig.base.json`,
|
|
2361
2361
|
composite: true,
|
|
2362
2362
|
compilerOptions: {
|
|
2363
|
-
outDir: `${offsetFromRoot(
|
|
2363
|
+
outDir: `${offsetFromRoot(normalized.projectRoot)}dist/out-tsc`
|
|
2364
2364
|
},
|
|
2365
2365
|
files: [],
|
|
2366
2366
|
include: [
|
|
@@ -2419,9 +2419,13 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2419
2419
|
writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2420
2420
|
}
|
|
2421
2421
|
__name(createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2422
|
-
async function normalizeOptions(tree, options) {
|
|
2422
|
+
async function normalizeOptions(tree, options, config) {
|
|
2423
|
+
let importPath = options.importPath;
|
|
2424
|
+
if (!importPath && config?.namespace) {
|
|
2425
|
+
importPath = `@${config?.namespace}/${options.name}`;
|
|
2426
|
+
}
|
|
2423
2427
|
if (options.publishable) {
|
|
2424
|
-
if (!
|
|
2428
|
+
if (!importPath) {
|
|
2425
2429
|
throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
|
|
2426
2430
|
}
|
|
2427
2431
|
}
|
|
@@ -2430,14 +2434,14 @@ async function normalizeOptions(tree, options) {
|
|
|
2430
2434
|
bundler = "none";
|
|
2431
2435
|
}
|
|
2432
2436
|
const { Linter } = ensurePackage("@nx/eslint", nxVersion);
|
|
2433
|
-
const
|
|
2437
|
+
const rootProject = false;
|
|
2438
|
+
const { projectName, names: projectNames, projectRoot, importPath: normalizedImportPath } = await determineProjectNameAndRootOptions(tree, {
|
|
2434
2439
|
name: options.name,
|
|
2435
2440
|
projectType: "library",
|
|
2436
2441
|
directory: options.directory,
|
|
2437
|
-
importPath
|
|
2438
|
-
rootProject
|
|
2442
|
+
importPath,
|
|
2443
|
+
rootProject
|
|
2439
2444
|
});
|
|
2440
|
-
options.rootProject = projectRoot === ".";
|
|
2441
2445
|
const normalized = names(projectNames.projectFileName);
|
|
2442
2446
|
const fileName = normalized.fileName;
|
|
2443
2447
|
return {
|
|
@@ -2463,7 +2467,8 @@ async function normalizeOptions(tree, options) {
|
|
|
2463
2467
|
projectNames,
|
|
2464
2468
|
projectRoot,
|
|
2465
2469
|
parsedTags: options.tags ? options.tags.split(",").map((s) => s.trim()) : [],
|
|
2466
|
-
importPath
|
|
2470
|
+
importPath: normalizedImportPath,
|
|
2471
|
+
rootProject
|
|
2467
2472
|
};
|
|
2468
2473
|
}
|
|
2469
2474
|
__name(normalizeOptions, "normalizeOptions");
|
|
@@ -3248,37 +3253,17 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3248
3253
|
enum: [
|
|
3249
3254
|
"neutral",
|
|
3250
3255
|
"node",
|
|
3256
|
+
"worker",
|
|
3251
3257
|
"browser"
|
|
3252
3258
|
]
|
|
3253
3259
|
},
|
|
3254
3260
|
$default: "neutral"
|
|
3255
3261
|
},
|
|
3256
|
-
|
|
3257
|
-
$schema: {
|
|
3258
|
-
title: "Dev Dependencies",
|
|
3259
|
-
type: "object",
|
|
3260
|
-
description: "The dev dependencies to install"
|
|
3261
|
-
}
|
|
3262
|
-
},
|
|
3263
|
-
dependencies: {
|
|
3264
|
-
$schema: {
|
|
3265
|
-
title: "Dependencies",
|
|
3266
|
-
type: "object",
|
|
3267
|
-
description: "The dependencies to install"
|
|
3268
|
-
}
|
|
3269
|
-
},
|
|
3270
|
-
peerDependencies: {
|
|
3271
|
-
$schema: {
|
|
3272
|
-
title: "Peer Dependencies",
|
|
3273
|
-
type: "object",
|
|
3274
|
-
description: "The peer dependencies to install"
|
|
3275
|
-
}
|
|
3276
|
-
},
|
|
3277
|
-
peerDependenciesMeta: {
|
|
3262
|
+
importPath: {
|
|
3278
3263
|
$schema: {
|
|
3279
|
-
title: "
|
|
3280
|
-
type: "
|
|
3281
|
-
description: "The
|
|
3264
|
+
title: "Import Path",
|
|
3265
|
+
type: "string",
|
|
3266
|
+
description: "The import path for the library"
|
|
3282
3267
|
}
|
|
3283
3268
|
},
|
|
3284
3269
|
tags: {
|
|
@@ -3288,41 +3273,6 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3288
3273
|
description: "The tags for the library"
|
|
3289
3274
|
}
|
|
3290
3275
|
},
|
|
3291
|
-
tsconfigOptions: {
|
|
3292
|
-
$schema: {
|
|
3293
|
-
title: "TypeScript Config (tsconfig.json) Options",
|
|
3294
|
-
type: "object",
|
|
3295
|
-
description: "The TypeScript configuration options"
|
|
3296
|
-
}
|
|
3297
|
-
},
|
|
3298
|
-
skipFormat: {
|
|
3299
|
-
$schema: {
|
|
3300
|
-
title: "Skip Format",
|
|
3301
|
-
type: "boolean",
|
|
3302
|
-
description: "Skip formatting"
|
|
3303
|
-
}
|
|
3304
|
-
},
|
|
3305
|
-
skipTsConfig: {
|
|
3306
|
-
$schema: {
|
|
3307
|
-
title: "Skip TsConfig",
|
|
3308
|
-
type: "boolean",
|
|
3309
|
-
description: "Skip TypeScript configuration"
|
|
3310
|
-
}
|
|
3311
|
-
},
|
|
3312
|
-
skipPackageJson: {
|
|
3313
|
-
$schema: {
|
|
3314
|
-
title: "Skip Package Json",
|
|
3315
|
-
type: "boolean",
|
|
3316
|
-
description: "Skip package.json"
|
|
3317
|
-
}
|
|
3318
|
-
},
|
|
3319
|
-
includeBabelRc: {
|
|
3320
|
-
$schema: {
|
|
3321
|
-
title: "Include Babel Rc",
|
|
3322
|
-
type: "boolean",
|
|
3323
|
-
description: "Include Babel configuration"
|
|
3324
|
-
}
|
|
3325
|
-
},
|
|
3326
3276
|
unitTestRunner: {
|
|
3327
3277
|
$schema: {
|
|
3328
3278
|
title: "Unit Test Runner",
|
|
@@ -3335,13 +3285,6 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3335
3285
|
description: "The unit test runner to use"
|
|
3336
3286
|
}
|
|
3337
3287
|
},
|
|
3338
|
-
linter: {
|
|
3339
|
-
$schema: {
|
|
3340
|
-
title: "Linter",
|
|
3341
|
-
type: "string",
|
|
3342
|
-
description: "The linter to use"
|
|
3343
|
-
}
|
|
3344
|
-
},
|
|
3345
3288
|
testEnvironment: {
|
|
3346
3289
|
$schema: {
|
|
3347
3290
|
title: "Test Environment",
|
|
@@ -3353,136 +3296,37 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
3353
3296
|
description: "The test environment to use"
|
|
3354
3297
|
}
|
|
3355
3298
|
},
|
|
3356
|
-
importPath: {
|
|
3357
|
-
$schema: {
|
|
3358
|
-
title: "Import Path",
|
|
3359
|
-
type: "string",
|
|
3360
|
-
description: "The import path for the library"
|
|
3361
|
-
}
|
|
3362
|
-
},
|
|
3363
|
-
js: {
|
|
3364
|
-
$schema: {
|
|
3365
|
-
title: "JavaScript",
|
|
3366
|
-
type: "boolean",
|
|
3367
|
-
description: "Use JavaScript instead of TypeScript"
|
|
3368
|
-
}
|
|
3369
|
-
},
|
|
3370
3299
|
pascalCaseFiles: {
|
|
3371
3300
|
$schema: {
|
|
3372
3301
|
title: "Pascal Case Files",
|
|
3373
3302
|
type: "boolean",
|
|
3374
3303
|
description: "Use PascalCase for file names"
|
|
3375
|
-
}
|
|
3304
|
+
},
|
|
3305
|
+
$default: false
|
|
3376
3306
|
},
|
|
3377
3307
|
strict: {
|
|
3378
3308
|
$schema: {
|
|
3379
3309
|
title: "Strict",
|
|
3380
3310
|
type: "boolean",
|
|
3381
3311
|
description: "Enable strict mode"
|
|
3382
|
-
}
|
|
3312
|
+
},
|
|
3313
|
+
$default: true
|
|
3383
3314
|
},
|
|
3384
3315
|
publishable: {
|
|
3385
3316
|
$schema: {
|
|
3386
3317
|
title: "Publishable",
|
|
3387
3318
|
type: "boolean",
|
|
3388
3319
|
description: "Make the library publishable"
|
|
3389
|
-
}
|
|
3320
|
+
},
|
|
3321
|
+
$default: false
|
|
3390
3322
|
},
|
|
3391
3323
|
buildable: {
|
|
3392
3324
|
$schema: {
|
|
3393
3325
|
title: "Buildable",
|
|
3394
3326
|
type: "boolean",
|
|
3395
3327
|
description: "Make the library buildable"
|
|
3396
|
-
}
|
|
3397
|
-
|
|
3398
|
-
setParserOptionsProject: {
|
|
3399
|
-
$schema: {
|
|
3400
|
-
title: "Set Parser Options Project",
|
|
3401
|
-
type: "boolean",
|
|
3402
|
-
description: "Set parser options project"
|
|
3403
|
-
}
|
|
3404
|
-
},
|
|
3405
|
-
config: {
|
|
3406
|
-
$schema: {
|
|
3407
|
-
title: "Config",
|
|
3408
|
-
type: "string",
|
|
3409
|
-
enum: [
|
|
3410
|
-
"workspace",
|
|
3411
|
-
"project",
|
|
3412
|
-
"npm-scripts"
|
|
3413
|
-
],
|
|
3414
|
-
description: "The configuration type"
|
|
3415
|
-
}
|
|
3416
|
-
},
|
|
3417
|
-
compiler: {
|
|
3418
|
-
$schema: {
|
|
3419
|
-
title: "Compiler",
|
|
3420
|
-
type: "string",
|
|
3421
|
-
description: "The compiler to use"
|
|
3422
|
-
}
|
|
3423
|
-
},
|
|
3424
|
-
bundler: {
|
|
3425
|
-
$schema: {
|
|
3426
|
-
title: "Bundler",
|
|
3427
|
-
type: "string",
|
|
3428
|
-
description: "The bundler to use"
|
|
3429
|
-
}
|
|
3430
|
-
},
|
|
3431
|
-
skipTypeCheck: {
|
|
3432
|
-
$schema: {
|
|
3433
|
-
title: "Skip Type Check",
|
|
3434
|
-
type: "boolean",
|
|
3435
|
-
description: "Skip type checking"
|
|
3436
|
-
}
|
|
3437
|
-
},
|
|
3438
|
-
minimal: {
|
|
3439
|
-
$schema: {
|
|
3440
|
-
title: "Minimal",
|
|
3441
|
-
type: "boolean",
|
|
3442
|
-
description: "Create a minimal library"
|
|
3443
|
-
}
|
|
3444
|
-
},
|
|
3445
|
-
rootProject: {
|
|
3446
|
-
$schema: {
|
|
3447
|
-
title: "Root Project",
|
|
3448
|
-
type: "boolean",
|
|
3449
|
-
description: "Create a root project"
|
|
3450
|
-
}
|
|
3451
|
-
},
|
|
3452
|
-
simpleName: {
|
|
3453
|
-
$schema: {
|
|
3454
|
-
title: "Simple Name",
|
|
3455
|
-
type: "boolean",
|
|
3456
|
-
description: "Use a simple name for the library"
|
|
3457
|
-
}
|
|
3458
|
-
},
|
|
3459
|
-
addPlugin: {
|
|
3460
|
-
$schema: {
|
|
3461
|
-
title: "Add Plugin",
|
|
3462
|
-
type: "boolean",
|
|
3463
|
-
description: "Add a plugin to the library"
|
|
3464
|
-
}
|
|
3465
|
-
},
|
|
3466
|
-
useProjectJson: {
|
|
3467
|
-
$schema: {
|
|
3468
|
-
title: "Use Project Json",
|
|
3469
|
-
type: "boolean",
|
|
3470
|
-
description: "Use project.json"
|
|
3471
|
-
}
|
|
3472
|
-
},
|
|
3473
|
-
skipWorkspacesWarning: {
|
|
3474
|
-
$schema: {
|
|
3475
|
-
title: "Skip Workspaces Warning",
|
|
3476
|
-
type: "boolean",
|
|
3477
|
-
description: "Skip workspaces warning"
|
|
3478
|
-
}
|
|
3479
|
-
},
|
|
3480
|
-
useTscExecutor: {
|
|
3481
|
-
$schema: {
|
|
3482
|
-
title: "Use Tsc Executor",
|
|
3483
|
-
type: "boolean",
|
|
3484
|
-
description: "Use TSC executor"
|
|
3485
|
-
}
|
|
3328
|
+
},
|
|
3329
|
+
$default: true
|
|
3486
3330
|
}
|
|
3487
3331
|
});
|
|
3488
3332
|
|
|
@@ -2187,48 +2187,48 @@ var nodeVersion = "20.11.0";
|
|
|
2187
2187
|
var pnpmVersion = "8.10.2";
|
|
2188
2188
|
|
|
2189
2189
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
2190
|
-
async function typeScriptLibraryGeneratorFn(tree,
|
|
2191
|
-
const
|
|
2192
|
-
...
|
|
2190
|
+
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
2191
|
+
const normalized = await normalizeOptions(tree, {
|
|
2192
|
+
...options
|
|
2193
2193
|
});
|
|
2194
2194
|
const tasks = [];
|
|
2195
2195
|
tasks.push(await _init2.default.call(void 0, tree, {
|
|
2196
|
-
...
|
|
2197
|
-
tsConfigName:
|
|
2196
|
+
...normalized,
|
|
2197
|
+
tsConfigName: normalized.rootProject ? "tsconfig.json" : "tsconfig.base.json"
|
|
2198
2198
|
}));
|
|
2199
2199
|
tasks.push(_devkit.addDependenciesToPackageJson.call(void 0, tree, {}, {
|
|
2200
2200
|
"@storm-software/workspace-tools": "latest",
|
|
2201
2201
|
"@storm-software/testing-tools": "latest",
|
|
2202
|
-
..._nullishCoalesce(
|
|
2202
|
+
..._nullishCoalesce(options.devDependencies, () => ( {}))
|
|
2203
2203
|
}));
|
|
2204
|
-
if (
|
|
2204
|
+
if (normalized.publishable) {
|
|
2205
2205
|
tasks.push(await _generator2.default.call(void 0, tree, {
|
|
2206
|
-
...
|
|
2206
|
+
...normalized,
|
|
2207
2207
|
skipFormat: true
|
|
2208
2208
|
}));
|
|
2209
2209
|
}
|
|
2210
2210
|
const projectConfig = {
|
|
2211
|
-
root:
|
|
2211
|
+
root: normalized.directory,
|
|
2212
2212
|
projectType: "library",
|
|
2213
|
-
sourceRoot: _chunk43HWVEICjs.joinPaths.call(void 0, _nullishCoalesce(
|
|
2213
|
+
sourceRoot: _chunk43HWVEICjs.joinPaths.call(void 0, _nullishCoalesce(normalized.directory, () => ( "")), "src"),
|
|
2214
2214
|
targets: {
|
|
2215
2215
|
build: {
|
|
2216
|
-
executor:
|
|
2216
|
+
executor: options.buildExecutor,
|
|
2217
2217
|
outputs: [
|
|
2218
2218
|
"{options.outputPath}"
|
|
2219
2219
|
],
|
|
2220
2220
|
options: {
|
|
2221
2221
|
entry: [
|
|
2222
|
-
_chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2222
|
+
_chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "src", "index.ts")
|
|
2223
2223
|
],
|
|
2224
|
-
outputPath: getOutputPath(
|
|
2225
|
-
tsconfig: _chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2226
|
-
project: _chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2224
|
+
outputPath: getOutputPath(normalized),
|
|
2225
|
+
tsconfig: _chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json"),
|
|
2226
|
+
project: _chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "package.json"),
|
|
2227
2227
|
defaultConfiguration: "production",
|
|
2228
2228
|
platform: "neutral",
|
|
2229
2229
|
assets: [
|
|
2230
2230
|
{
|
|
2231
|
-
input:
|
|
2231
|
+
input: normalized.projectRoot,
|
|
2232
2232
|
glob: "*.md",
|
|
2233
2233
|
output: "/"
|
|
2234
2234
|
},
|
|
@@ -2252,19 +2252,19 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
};
|
|
2255
|
-
if (
|
|
2256
|
-
projectConfig.targets.build.options.platform =
|
|
2255
|
+
if (options.platform) {
|
|
2256
|
+
projectConfig.targets.build.options.platform = options.platform === "worker" ? "node" : options.platform;
|
|
2257
2257
|
}
|
|
2258
|
-
_chunkVTHBMY4Bjs.addProjectTag.call(void 0, projectConfig, _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.TAG_ID,
|
|
2258
|
+
_chunkVTHBMY4Bjs.addProjectTag.call(void 0, projectConfig, _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.TAG_ID, options.platform === "node" ? _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.NODE : options.platform === "worker" ? _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.WORKER : options.platform === "browser" ? _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.BROWSER : _chunkVTHBMY4Bjs.ProjectTagConstants.Platform.NEUTRAL, {
|
|
2259
2259
|
overwrite: false
|
|
2260
2260
|
});
|
|
2261
|
-
createProjectTsConfigJson(tree,
|
|
2262
|
-
_devkit.addProjectConfiguration.call(void 0, tree,
|
|
2261
|
+
createProjectTsConfigJson(tree, normalized);
|
|
2262
|
+
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
2263
2263
|
let repository = {
|
|
2264
2264
|
type: "github",
|
|
2265
2265
|
url: _optionalChain([config, 'optionalAccess', _117 => _117.repository]) || `https://github.com/${_optionalChain([config, 'optionalAccess', _118 => _118.organization]) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _119 => _119.namespace]) || _optionalChain([config, 'optionalAccess', _120 => _120.name]) || "repository"}.git`
|
|
2266
2266
|
};
|
|
2267
|
-
let description =
|
|
2267
|
+
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
2268
2268
|
if (tree.exists("package.json")) {
|
|
2269
2269
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
2270
2270
|
if (_optionalChain([packageJson, 'optionalAccess', _121 => _121.repository])) {
|
|
@@ -2274,18 +2274,18 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2274
2274
|
description = packageJson.description;
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
|
-
if (!
|
|
2278
|
-
|
|
2277
|
+
if (!normalized.importPath) {
|
|
2278
|
+
normalized.importPath = normalized.name;
|
|
2279
2279
|
}
|
|
2280
|
-
const packageJsonPath = _chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2280
|
+
const packageJsonPath = _chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "package.json");
|
|
2281
2281
|
if (tree.exists(packageJsonPath)) {
|
|
2282
2282
|
_devkit.updateJson.call(void 0, tree, packageJsonPath, (json) => {
|
|
2283
|
-
if (!
|
|
2284
|
-
|
|
2283
|
+
if (!normalized.importPath) {
|
|
2284
|
+
normalized.importPath = normalized.name;
|
|
2285
2285
|
}
|
|
2286
|
-
json.name =
|
|
2286
|
+
json.name = normalized.importPath;
|
|
2287
2287
|
json.version = "0.0.1";
|
|
2288
|
-
if (json.private && (
|
|
2288
|
+
if (json.private && (normalized.publishable || normalized.rootProject)) {
|
|
2289
2289
|
json.private = void 0;
|
|
2290
2290
|
}
|
|
2291
2291
|
return {
|
|
@@ -2294,7 +2294,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2294
2294
|
description,
|
|
2295
2295
|
repository: {
|
|
2296
2296
|
...repository,
|
|
2297
|
-
directory:
|
|
2297
|
+
directory: normalized.projectRoot
|
|
2298
2298
|
},
|
|
2299
2299
|
type: "module",
|
|
2300
2300
|
dependencies: {
|
|
@@ -2307,37 +2307,37 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2307
2307
|
});
|
|
2308
2308
|
} else {
|
|
2309
2309
|
_devkit.writeJson.call(void 0, tree, packageJsonPath, {
|
|
2310
|
-
name:
|
|
2310
|
+
name: normalized.importPath,
|
|
2311
2311
|
version: "0.0.1",
|
|
2312
2312
|
description,
|
|
2313
2313
|
repository: {
|
|
2314
2314
|
...repository,
|
|
2315
|
-
directory:
|
|
2315
|
+
directory: normalized.projectRoot
|
|
2316
2316
|
},
|
|
2317
|
-
private: !
|
|
2317
|
+
private: !normalized.publishable || normalized.rootProject,
|
|
2318
2318
|
type: "module",
|
|
2319
2319
|
publishConfig: {
|
|
2320
2320
|
access: "public"
|
|
2321
2321
|
}
|
|
2322
2322
|
});
|
|
2323
2323
|
}
|
|
2324
|
-
if (tree.exists("package.json") &&
|
|
2324
|
+
if (tree.exists("package.json") && normalized.importPath) {
|
|
2325
2325
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
2326
2326
|
...json,
|
|
2327
2327
|
pnpm: {
|
|
2328
2328
|
..._optionalChain([json, 'optionalAccess', _123 => _123.pnpm]),
|
|
2329
2329
|
overrides: {
|
|
2330
2330
|
..._optionalChain([json, 'optionalAccess', _124 => _124.pnpm, 'optionalAccess', _125 => _125.overrides]),
|
|
2331
|
-
[_nullishCoalesce(
|
|
2331
|
+
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
2332
2332
|
}
|
|
2333
2333
|
}
|
|
2334
2334
|
}));
|
|
2335
2335
|
}
|
|
2336
|
-
_js.addTsConfigPath.call(void 0, tree,
|
|
2337
|
-
_chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2336
|
+
_js.addTsConfigPath.call(void 0, tree, normalized.importPath, [
|
|
2337
|
+
_chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "./src", `index.${normalized.js ? "js" : "ts"}`)
|
|
2338
2338
|
]);
|
|
2339
|
-
_js.addTsConfigPath.call(void 0, tree, _chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2340
|
-
_chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2339
|
+
_js.addTsConfigPath.call(void 0, tree, _chunk43HWVEICjs.joinPaths.call(void 0, normalized.importPath, "/*"), [
|
|
2340
|
+
_chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "./src", "/*")
|
|
2341
2341
|
]);
|
|
2342
2342
|
if (tree.exists("package.json")) {
|
|
2343
2343
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
@@ -2348,7 +2348,7 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2348
2348
|
description = packageJson.description;
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
2351
|
-
const tsconfigPath = _chunk43HWVEICjs.joinPaths.call(void 0,
|
|
2351
|
+
const tsconfigPath = _chunk43HWVEICjs.joinPaths.call(void 0, normalized.projectRoot, "tsconfig.json");
|
|
2352
2352
|
if (tree.exists(tsconfigPath)) {
|
|
2353
2353
|
_devkit.updateJson.call(void 0, tree, tsconfigPath, (json) => {
|
|
2354
2354
|
json.composite ??= true;
|
|
@@ -2356,10 +2356,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema, config) {
|
|
|
2356
2356
|
});
|
|
2357
2357
|
} else {
|
|
2358
2358
|
_devkit.writeJson.call(void 0, tree, tsconfigPath, {
|
|
2359
|
-
extends: `${_devkit.offsetFromRoot.call(void 0,
|
|
2359
|
+
extends: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}tsconfig.base.json`,
|
|
2360
2360
|
composite: true,
|
|
2361
2361
|
compilerOptions: {
|
|
2362
|
-
outDir: `${_devkit.offsetFromRoot.call(void 0,
|
|
2362
|
+
outDir: `${_devkit.offsetFromRoot.call(void 0, normalized.projectRoot)}dist/out-tsc`
|
|
2363
2363
|
},
|
|
2364
2364
|
files: [],
|
|
2365
2365
|
include: [
|
|
@@ -2418,9 +2418,13 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
2418
2418
|
_devkit.writeJson.call(void 0, tree, _chunk43HWVEICjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json"), tsconfig);
|
|
2419
2419
|
}
|
|
2420
2420
|
_chunkJ5SB6L2Ljs.__name.call(void 0, createProjectTsConfigJson, "createProjectTsConfigJson");
|
|
2421
|
-
async function normalizeOptions(tree, options) {
|
|
2421
|
+
async function normalizeOptions(tree, options, config) {
|
|
2422
|
+
let importPath = options.importPath;
|
|
2423
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _137 => _137.namespace])) {
|
|
2424
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _138 => _138.namespace])}/${options.name}`;
|
|
2425
|
+
}
|
|
2422
2426
|
if (options.publishable) {
|
|
2423
|
-
if (!
|
|
2427
|
+
if (!importPath) {
|
|
2424
2428
|
throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
|
|
2425
2429
|
}
|
|
2426
2430
|
}
|
|
@@ -2429,14 +2433,14 @@ async function normalizeOptions(tree, options) {
|
|
|
2429
2433
|
bundler = "none";
|
|
2430
2434
|
}
|
|
2431
2435
|
const { Linter } = _devkit.ensurePackage.call(void 0, "@nx/eslint", nxVersion);
|
|
2432
|
-
const
|
|
2436
|
+
const rootProject = false;
|
|
2437
|
+
const { projectName, names: projectNames, projectRoot, importPath: normalizedImportPath } = await _projectnameandrootutils.determineProjectNameAndRootOptions.call(void 0, tree, {
|
|
2433
2438
|
name: options.name,
|
|
2434
2439
|
projectType: "library",
|
|
2435
2440
|
directory: options.directory,
|
|
2436
|
-
importPath
|
|
2437
|
-
rootProject
|
|
2441
|
+
importPath,
|
|
2442
|
+
rootProject
|
|
2438
2443
|
});
|
|
2439
|
-
options.rootProject = projectRoot === ".";
|
|
2440
2444
|
const normalized = _devkit.names.call(void 0, projectNames.projectFileName);
|
|
2441
2445
|
const fileName = normalized.fileName;
|
|
2442
2446
|
return {
|
|
@@ -2462,7 +2466,8 @@ async function normalizeOptions(tree, options) {
|
|
|
2462
2466
|
projectNames,
|
|
2463
2467
|
projectRoot,
|
|
2464
2468
|
parsedTags: options.tags ? options.tags.split(",").map((s) => s.trim()) : [],
|
|
2465
|
-
importPath
|
|
2469
|
+
importPath: normalizedImportPath,
|
|
2470
|
+
rootProject
|
|
2466
2471
|
};
|
|
2467
2472
|
}
|
|
2468
2473
|
_chunkJ5SB6L2Ljs.__name.call(void 0, normalizeOptions, "normalizeOptions");
|
|
@@ -2547,7 +2552,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
2547
2552
|
name: "StormWorkspaceConfiguration"
|
|
2548
2553
|
});
|
|
2549
2554
|
_chunk43HWVEICjs.writeTrace.call(void 0, jsonSchema, config);
|
|
2550
|
-
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
2555
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(_nullishCoalesce(_optionalChain([config, 'optionalAccess', _139 => _139.workspaceRoot]), () => ( _chunk43HWVEICjs.findWorkspaceRoot.call(void 0, ))), _optionalChain([options, 'access', _140 => _140.outputFile, 'optionalAccess', _141 => _141.startsWith, 'call', _142 => _142("./")]) ? "" : "./");
|
|
2551
2556
|
_chunk43HWVEICjs.writeTrace.call(void 0, `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`, config);
|
|
2552
2557
|
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, {
|
|
2553
2558
|
spaces: 2
|
|
@@ -3247,37 +3252,17 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
3247
3252
|
enum: [
|
|
3248
3253
|
"neutral",
|
|
3249
3254
|
"node",
|
|
3255
|
+
"worker",
|
|
3250
3256
|
"browser"
|
|
3251
3257
|
]
|
|
3252
3258
|
},
|
|
3253
3259
|
$default: "neutral"
|
|
3254
3260
|
},
|
|
3255
|
-
|
|
3256
|
-
$schema: {
|
|
3257
|
-
title: "Dev Dependencies",
|
|
3258
|
-
type: "object",
|
|
3259
|
-
description: "The dev dependencies to install"
|
|
3260
|
-
}
|
|
3261
|
-
},
|
|
3262
|
-
dependencies: {
|
|
3263
|
-
$schema: {
|
|
3264
|
-
title: "Dependencies",
|
|
3265
|
-
type: "object",
|
|
3266
|
-
description: "The dependencies to install"
|
|
3267
|
-
}
|
|
3268
|
-
},
|
|
3269
|
-
peerDependencies: {
|
|
3270
|
-
$schema: {
|
|
3271
|
-
title: "Peer Dependencies",
|
|
3272
|
-
type: "object",
|
|
3273
|
-
description: "The peer dependencies to install"
|
|
3274
|
-
}
|
|
3275
|
-
},
|
|
3276
|
-
peerDependenciesMeta: {
|
|
3261
|
+
importPath: {
|
|
3277
3262
|
$schema: {
|
|
3278
|
-
title: "
|
|
3279
|
-
type: "
|
|
3280
|
-
description: "The
|
|
3263
|
+
title: "Import Path",
|
|
3264
|
+
type: "string",
|
|
3265
|
+
description: "The import path for the library"
|
|
3281
3266
|
}
|
|
3282
3267
|
},
|
|
3283
3268
|
tags: {
|
|
@@ -3287,41 +3272,6 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
3287
3272
|
description: "The tags for the library"
|
|
3288
3273
|
}
|
|
3289
3274
|
},
|
|
3290
|
-
tsconfigOptions: {
|
|
3291
|
-
$schema: {
|
|
3292
|
-
title: "TypeScript Config (tsconfig.json) Options",
|
|
3293
|
-
type: "object",
|
|
3294
|
-
description: "The TypeScript configuration options"
|
|
3295
|
-
}
|
|
3296
|
-
},
|
|
3297
|
-
skipFormat: {
|
|
3298
|
-
$schema: {
|
|
3299
|
-
title: "Skip Format",
|
|
3300
|
-
type: "boolean",
|
|
3301
|
-
description: "Skip formatting"
|
|
3302
|
-
}
|
|
3303
|
-
},
|
|
3304
|
-
skipTsConfig: {
|
|
3305
|
-
$schema: {
|
|
3306
|
-
title: "Skip TsConfig",
|
|
3307
|
-
type: "boolean",
|
|
3308
|
-
description: "Skip TypeScript configuration"
|
|
3309
|
-
}
|
|
3310
|
-
},
|
|
3311
|
-
skipPackageJson: {
|
|
3312
|
-
$schema: {
|
|
3313
|
-
title: "Skip Package Json",
|
|
3314
|
-
type: "boolean",
|
|
3315
|
-
description: "Skip package.json"
|
|
3316
|
-
}
|
|
3317
|
-
},
|
|
3318
|
-
includeBabelRc: {
|
|
3319
|
-
$schema: {
|
|
3320
|
-
title: "Include Babel Rc",
|
|
3321
|
-
type: "boolean",
|
|
3322
|
-
description: "Include Babel configuration"
|
|
3323
|
-
}
|
|
3324
|
-
},
|
|
3325
3275
|
unitTestRunner: {
|
|
3326
3276
|
$schema: {
|
|
3327
3277
|
title: "Unit Test Runner",
|
|
@@ -3334,13 +3284,6 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
3334
3284
|
description: "The unit test runner to use"
|
|
3335
3285
|
}
|
|
3336
3286
|
},
|
|
3337
|
-
linter: {
|
|
3338
|
-
$schema: {
|
|
3339
|
-
title: "Linter",
|
|
3340
|
-
type: "string",
|
|
3341
|
-
description: "The linter to use"
|
|
3342
|
-
}
|
|
3343
|
-
},
|
|
3344
3287
|
testEnvironment: {
|
|
3345
3288
|
$schema: {
|
|
3346
3289
|
title: "Test Environment",
|
|
@@ -3352,136 +3295,37 @@ var typescript_library_generator_untyped_default = _untyped.defineUntypedSchema.
|
|
|
3352
3295
|
description: "The test environment to use"
|
|
3353
3296
|
}
|
|
3354
3297
|
},
|
|
3355
|
-
importPath: {
|
|
3356
|
-
$schema: {
|
|
3357
|
-
title: "Import Path",
|
|
3358
|
-
type: "string",
|
|
3359
|
-
description: "The import path for the library"
|
|
3360
|
-
}
|
|
3361
|
-
},
|
|
3362
|
-
js: {
|
|
3363
|
-
$schema: {
|
|
3364
|
-
title: "JavaScript",
|
|
3365
|
-
type: "boolean",
|
|
3366
|
-
description: "Use JavaScript instead of TypeScript"
|
|
3367
|
-
}
|
|
3368
|
-
},
|
|
3369
3298
|
pascalCaseFiles: {
|
|
3370
3299
|
$schema: {
|
|
3371
3300
|
title: "Pascal Case Files",
|
|
3372
3301
|
type: "boolean",
|
|
3373
3302
|
description: "Use PascalCase for file names"
|
|
3374
|
-
}
|
|
3303
|
+
},
|
|
3304
|
+
$default: false
|
|
3375
3305
|
},
|
|
3376
3306
|
strict: {
|
|
3377
3307
|
$schema: {
|
|
3378
3308
|
title: "Strict",
|
|
3379
3309
|
type: "boolean",
|
|
3380
3310
|
description: "Enable strict mode"
|
|
3381
|
-
}
|
|
3311
|
+
},
|
|
3312
|
+
$default: true
|
|
3382
3313
|
},
|
|
3383
3314
|
publishable: {
|
|
3384
3315
|
$schema: {
|
|
3385
3316
|
title: "Publishable",
|
|
3386
3317
|
type: "boolean",
|
|
3387
3318
|
description: "Make the library publishable"
|
|
3388
|
-
}
|
|
3319
|
+
},
|
|
3320
|
+
$default: false
|
|
3389
3321
|
},
|
|
3390
3322
|
buildable: {
|
|
3391
3323
|
$schema: {
|
|
3392
3324
|
title: "Buildable",
|
|
3393
3325
|
type: "boolean",
|
|
3394
3326
|
description: "Make the library buildable"
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
setParserOptionsProject: {
|
|
3398
|
-
$schema: {
|
|
3399
|
-
title: "Set Parser Options Project",
|
|
3400
|
-
type: "boolean",
|
|
3401
|
-
description: "Set parser options project"
|
|
3402
|
-
}
|
|
3403
|
-
},
|
|
3404
|
-
config: {
|
|
3405
|
-
$schema: {
|
|
3406
|
-
title: "Config",
|
|
3407
|
-
type: "string",
|
|
3408
|
-
enum: [
|
|
3409
|
-
"workspace",
|
|
3410
|
-
"project",
|
|
3411
|
-
"npm-scripts"
|
|
3412
|
-
],
|
|
3413
|
-
description: "The configuration type"
|
|
3414
|
-
}
|
|
3415
|
-
},
|
|
3416
|
-
compiler: {
|
|
3417
|
-
$schema: {
|
|
3418
|
-
title: "Compiler",
|
|
3419
|
-
type: "string",
|
|
3420
|
-
description: "The compiler to use"
|
|
3421
|
-
}
|
|
3422
|
-
},
|
|
3423
|
-
bundler: {
|
|
3424
|
-
$schema: {
|
|
3425
|
-
title: "Bundler",
|
|
3426
|
-
type: "string",
|
|
3427
|
-
description: "The bundler to use"
|
|
3428
|
-
}
|
|
3429
|
-
},
|
|
3430
|
-
skipTypeCheck: {
|
|
3431
|
-
$schema: {
|
|
3432
|
-
title: "Skip Type Check",
|
|
3433
|
-
type: "boolean",
|
|
3434
|
-
description: "Skip type checking"
|
|
3435
|
-
}
|
|
3436
|
-
},
|
|
3437
|
-
minimal: {
|
|
3438
|
-
$schema: {
|
|
3439
|
-
title: "Minimal",
|
|
3440
|
-
type: "boolean",
|
|
3441
|
-
description: "Create a minimal library"
|
|
3442
|
-
}
|
|
3443
|
-
},
|
|
3444
|
-
rootProject: {
|
|
3445
|
-
$schema: {
|
|
3446
|
-
title: "Root Project",
|
|
3447
|
-
type: "boolean",
|
|
3448
|
-
description: "Create a root project"
|
|
3449
|
-
}
|
|
3450
|
-
},
|
|
3451
|
-
simpleName: {
|
|
3452
|
-
$schema: {
|
|
3453
|
-
title: "Simple Name",
|
|
3454
|
-
type: "boolean",
|
|
3455
|
-
description: "Use a simple name for the library"
|
|
3456
|
-
}
|
|
3457
|
-
},
|
|
3458
|
-
addPlugin: {
|
|
3459
|
-
$schema: {
|
|
3460
|
-
title: "Add Plugin",
|
|
3461
|
-
type: "boolean",
|
|
3462
|
-
description: "Add a plugin to the library"
|
|
3463
|
-
}
|
|
3464
|
-
},
|
|
3465
|
-
useProjectJson: {
|
|
3466
|
-
$schema: {
|
|
3467
|
-
title: "Use Project Json",
|
|
3468
|
-
type: "boolean",
|
|
3469
|
-
description: "Use project.json"
|
|
3470
|
-
}
|
|
3471
|
-
},
|
|
3472
|
-
skipWorkspacesWarning: {
|
|
3473
|
-
$schema: {
|
|
3474
|
-
title: "Skip Workspaces Warning",
|
|
3475
|
-
type: "boolean",
|
|
3476
|
-
description: "Skip workspaces warning"
|
|
3477
|
-
}
|
|
3478
|
-
},
|
|
3479
|
-
useTscExecutor: {
|
|
3480
|
-
$schema: {
|
|
3481
|
-
title: "Use Tsc Executor",
|
|
3482
|
-
type: "boolean",
|
|
3483
|
-
description: "Use TSC executor"
|
|
3484
|
-
}
|
|
3327
|
+
},
|
|
3328
|
+
$default: true
|
|
3485
3329
|
}
|
|
3486
3330
|
});
|
|
3487
3331
|
|
|
@@ -8,7 +8,7 @@ var require_package = _chunkJ5SB6L2Ljs.__commonJS.call(void 0, {
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@storm-software/cloudflare-tools",
|
|
11
|
-
version: "0.
|
|
11
|
+
version: "0.55.0",
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "github",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEVZKG55Xjs = require('./chunk-EVZKG55X.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk6Q4S7VSUjs = require('./chunk-6Q4S7VSU.js');
|
|
@@ -52,7 +52,7 @@ async function applicationGenerator(tree, schema) {
|
|
|
52
52
|
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`, config);
|
|
53
53
|
const options = await normalizeOptions(tree, schema, config);
|
|
54
54
|
const tasks = [];
|
|
55
|
-
tasks.push(await
|
|
55
|
+
tasks.push(await _chunkEVZKG55Xjs.generator_default.call(void 0, tree, {
|
|
56
56
|
...options,
|
|
57
57
|
skipFormat: true
|
|
58
58
|
}));
|
|
@@ -8,7 +8,7 @@ var require_package = __commonJS({
|
|
|
8
8
|
"package.json"(exports, module) {
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@storm-software/cloudflare-tools",
|
|
11
|
-
version: "0.
|
|
11
|
+
version: "0.55.0",
|
|
12
12
|
description: "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
13
13
|
repository: {
|
|
14
14
|
type: "github",
|
package/dist/executors.js
CHANGED
package/dist/executors.mjs
CHANGED
package/dist/generators.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkHHSRZEGFjs = require('./chunk-HHSRZEGF.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkEVZKG55Xjs = require('./chunk-EVZKG55X.js');
|
|
10
10
|
require('./chunk-6Q4S7VSU.js');
|
|
11
11
|
require('./chunk-43HWVEIC.js');
|
|
12
12
|
require('./chunk-J5SB6L2L.js');
|
|
@@ -15,4 +15,4 @@ require('./chunk-J5SB6L2L.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.applicationGenerator =
|
|
18
|
+
exports.applicationGenerator = _chunkHHSRZEGFjs.applicationGenerator; exports.applicationSchematic = _chunkHHSRZEGFjs.applicationSchematic; exports.initGenerator = _chunkEVZKG55Xjs.initGenerator; exports.initSchematic = _chunkEVZKG55Xjs.initSchematic;
|
package/dist/generators.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
applicationGenerator,
|
|
4
4
|
applicationSchematic
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EHG4WNC6.mjs";
|
|
6
6
|
import {
|
|
7
7
|
initGenerator,
|
|
8
8
|
initSchematic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZGKK7MNQ.mjs";
|
|
10
10
|
import "./chunk-BKBJDKMA.mjs";
|
|
11
11
|
import "./chunk-GMLMIRU7.mjs";
|
|
12
12
|
import "./chunk-A7FFSBE6.mjs";
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ require('./chunk-DHBG5ASJ.js');
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkHHSRZEGFjs = require('./chunk-HHSRZEGF.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkEVZKG55Xjs = require('./chunk-EVZKG55X.js');
|
|
11
11
|
require('./chunk-CVGPWUNP.js');
|
|
12
12
|
require('./chunk-R7AIVBS7.js');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-3QOI2KC5.js');
|
|
14
14
|
require('./chunk-GCD4ACJC.js');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -148,4 +148,4 @@ _chunkJ5SB6L2Ljs.__name.call(void 0, createPackageJson, "createPackageJson");
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
exports.applicationGenerator =
|
|
151
|
+
exports.applicationGenerator = _chunkHHSRZEGFjs.applicationGenerator; exports.applicationSchematic = _chunkHHSRZEGFjs.applicationSchematic; exports.createNodes = createNodes; exports.getInternalDependencies = _chunkADRS43PRjs.getInternalDependencies; exports.initGenerator = _chunkEVZKG55Xjs.initGenerator; exports.initSchematic = _chunkEVZKG55Xjs.initSchematic; exports.name = name; exports.r2UploadFile = _chunkADRS43PRjs.r2UploadFile;
|
package/dist/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import "./chunk-3J7KBHMJ.mjs";
|
|
|
3
3
|
import {
|
|
4
4
|
applicationGenerator,
|
|
5
5
|
applicationSchematic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EHG4WNC6.mjs";
|
|
7
7
|
import {
|
|
8
8
|
initGenerator,
|
|
9
9
|
initSchematic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZGKK7MNQ.mjs";
|
|
11
11
|
import "./chunk-7Z5PILRU.mjs";
|
|
12
12
|
import "./chunk-QEWY5YJA.mjs";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-22FI2MXA.mjs";
|
|
14
14
|
import "./chunk-XSVPXWSA.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getInternalDependencies,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
var _chunkR7AIVBS7js = require('../../../chunk-R7AIVBS7.js');
|
|
4
|
-
require('../../../chunk-
|
|
4
|
+
require('../../../chunk-3QOI2KC5.js');
|
|
5
5
|
require('../../../chunk-VTHBMY4B.js');
|
|
6
6
|
require('../../../chunk-6Q4S7VSU.js');
|
|
7
7
|
require('../../../chunk-43HWVEIC.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3QOI2KC5js = require('../../../chunk-3QOI2KC5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkVTHBMY4Bjs = require('../../../chunk-VTHBMY4B.js');
|
|
@@ -60,7 +60,7 @@ async function* serveExecutor(options, context, config) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
_chunkJ5SB6L2Ljs.__name.call(void 0, serveExecutor, "serveExecutor");
|
|
63
|
-
var executor_default =
|
|
63
|
+
var executor_default = _chunk3QOI2KC5js.withRunExecutor.call(void 0, "Cloudflare Serve executor", serveExecutor, {
|
|
64
64
|
skipReadingConfig: false,
|
|
65
65
|
hooks: {
|
|
66
66
|
applyDefaultOptions: /* @__PURE__ */ _chunkJ5SB6L2Ljs.__name.call(void 0, (options) => {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkEVZKG55Xjs = require('../../../chunk-EVZKG55X.js');
|
|
6
6
|
require('../../../chunk-J5SB6L2L.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkEVZKG55Xjs.generator_default; exports.initGenerator = _chunkEVZKG55Xjs.initGenerator; exports.initSchematic = _chunkEVZKG55Xjs.initSchematic;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../../chunk-
|
|
5
|
+
var _chunkHHSRZEGFjs = require('../../../chunk-HHSRZEGF.js');
|
|
6
|
+
require('../../../chunk-EVZKG55X.js');
|
|
7
7
|
require('../../../chunk-6Q4S7VSU.js');
|
|
8
8
|
require('../../../chunk-43HWVEIC.js');
|
|
9
9
|
require('../../../chunk-J5SB6L2L.js');
|
|
@@ -11,4 +11,4 @@ require('../../../chunk-J5SB6L2L.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.applicationGenerator =
|
|
14
|
+
exports.applicationGenerator = _chunkHHSRZEGFjs.applicationGenerator; exports.applicationSchematic = _chunkHHSRZEGFjs.applicationSchematic; exports.default = _chunkHHSRZEGFjs.generator_default;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
applicationGenerator,
|
|
3
3
|
applicationSchematic,
|
|
4
4
|
generator_default
|
|
5
|
-
} from "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
5
|
+
} from "../../../chunk-EHG4WNC6.mjs";
|
|
6
|
+
import "../../../chunk-ZGKK7MNQ.mjs";
|
|
7
7
|
import "../../../chunk-BKBJDKMA.mjs";
|
|
8
8
|
import "../../../chunk-GMLMIRU7.mjs";
|
|
9
9
|
import "../../../chunk-A7FFSBE6.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/cloudflare-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "github",
|