@storm-software/cloudflare-tools 0.24.1 → 0.26.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## 0.26.0 (2024-08-02)
2
+
3
+
4
+ ### Features
5
+
6
+ - **terraform-tools:** Initial check-in of project code ([c4ef4810](https://github.com/storm-software/storm-ops/commit/c4ef4810))
7
+
8
+ ## 0.25.0 (2024-08-02)
9
+
10
+
11
+ ### Features
12
+
13
+ - **eslint:** Reformatted the banner string whitespace ([2df75cbb](https://github.com/storm-software/storm-ops/commit/2df75cbb))
14
+
1
15
  ## 0.24.1 (2024-08-02)
2
16
 
3
17
 
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
- [![Version](https://img.shields.io/badge/version-0.24.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.25.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/generators.json CHANGED
@@ -1,4 +1,7 @@
1
1
  {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "name": "storm-workspace",
4
+ "version": "0.0.1",
2
5
  "generators": {
3
6
  "init": {
4
7
  "factory": "./src/generators/init/generator",
package/index.js CHANGED
@@ -65400,9 +65400,6 @@ var init_schema = __esm({
65400
65400
  "The worker of the package (this is the bot that will be used to perform various tasks)"
65401
65401
  ),
65402
65402
  env: z2.enum(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
65403
- ci: z2.boolean().default(true).describe(
65404
- "An indicator specifying if the current environment is a CI environment"
65405
- ),
65406
65403
  workspaceRoot: z2.string().trim().default("").describe("The root directory of the workspace"),
65407
65404
  packageDirectory: z2.string().trim().optional().describe("The root directory of the package"),
65408
65405
  externalPackagePatterns: z2.array(z2.string()).default([]).describe(
@@ -65529,7 +65526,6 @@ var init_get_default_config = __esm({
65529
65526
  env: "production",
65530
65527
  branch: "main",
65531
65528
  organization: "storm-software",
65532
- ci: true,
65533
65529
  configFile: null,
65534
65530
  runtimeVersion: "1.0.0",
65535
65531
  colors: { ...DEFAULT_COLOR_CONFIG },
@@ -67436,11 +67432,13 @@ var init_run = __esm({
67436
67432
  "packages/config-tools/src/utilities/run.ts"() {
67437
67433
  import_node_child_process5 = require("node:child_process");
67438
67434
  LARGE_BUFFER = 1024 * 1e6;
67439
- run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit") => {
67435
+ run = (config, command, cwd2 = config.workspaceRoot ?? process.cwd(), stdio = "inherit", env = process.env) => {
67440
67436
  return (0, import_node_child_process5.execSync)(command, {
67441
67437
  cwd: cwd2,
67442
67438
  env: {
67443
67439
  ...process.env,
67440
+ ...env,
67441
+ CLICOLOR: "true",
67444
67442
  FORCE_COLOR: "true"
67445
67443
  },
67446
67444
  stdio,
@@ -67682,9 +67680,14 @@ var init_get_env = __esm({
67682
67680
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
67683
67681
  outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
67684
67682
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
67685
- ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
67686
- process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
67687
- ) : void 0,
67683
+ // ci:
67684
+ // process.env[`${prefix}CI`] !== undefined
67685
+ // ? Boolean(
67686
+ // process.env[`${prefix}CI`] ??
67687
+ // process.env.CI ??
67688
+ // process.env.CONTINUOUS_INTEGRATION
67689
+ // )
67690
+ // : undefined,
67688
67691
  repository: process.env[`${prefix}REPOSITORY`],
67689
67692
  branch: process.env[`${prefix}BRANCH`],
67690
67693
  preid: process.env[`${prefix}PRE_ID`],
@@ -67885,11 +67888,6 @@ var init_set_env = __esm({
67885
67888
  process.env.NODE_ENV = config.env;
67886
67889
  process.env.ENVIRONMENT = config.env;
67887
67890
  }
67888
- if (config.ci) {
67889
- process.env[`${prefix}CI`] = String(config.ci);
67890
- process.env.CI = String(config.ci);
67891
- process.env.CONTINUOUS_INTEGRATION = String(config.ci);
67892
- }
67893
67891
  if (config.colors?.base?.light || config.colors?.base?.dark) {
67894
67892
  for (const key of Object.keys(config.colors)) {
67895
67893
  setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
@@ -68058,7 +68056,7 @@ var init_create_storm_config = __esm({
68058
68056
  };
68059
68057
  createStormConfig = (extensionName, schema, workspaceRoot3) => {
68060
68058
  let result;
68061
- if (!_static_cache) {
68059
+ if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 3e4) {
68062
68060
  const config = getConfigEnv();
68063
68061
  const defaultConfig = getDefaultConfig(config, workspaceRoot3);
68064
68062
  result = StormConfigSchema.parse({
@@ -68071,7 +68069,7 @@ var init_create_storm_config = __esm({
68071
68069
  });
68072
68070
  result.workspaceRoot ??= defaultConfig.workspaceRoot ? defaultConfig.workspaceRoot : findWorkspaceRoot(workspaceRoot3);
68073
68071
  } else {
68074
- result = _static_cache;
68072
+ result = _static_cache.data;
68075
68073
  }
68076
68074
  if (schema && extensionName) {
68077
68075
  result.extensions = {
@@ -68079,7 +68077,10 @@ var init_create_storm_config = __esm({
68079
68077
  [extensionName]: createConfigExtension(extensionName, schema)
68080
68078
  };
68081
68079
  }
68082
- _static_cache = result;
68080
+ _static_cache = {
68081
+ timestamp: Date.now(),
68082
+ data: result
68083
+ };
68083
68084
  return result;
68084
68085
  };
68085
68086
  createConfigExtension = (extensionName, schema) => {
@@ -68096,6 +68097,13 @@ var init_create_storm_config = __esm({
68096
68097
  };
68097
68098
  loadStormConfig = async (workspaceRoot3) => {
68098
68099
  let config = {};
68100
+ if (_static_cache?.data && _static_cache?.timestamp && _static_cache.timestamp >= Date.now() + 3e4) {
68101
+ writeInfo(
68102
+ `Configuration cache hit - ${_static_cache.timestamp}`,
68103
+ _static_cache.data
68104
+ );
68105
+ return _static_cache.data;
68106
+ }
68099
68107
  let _workspaceRoot = workspaceRoot3;
68100
68108
  if (!_workspaceRoot) {
68101
68109
  _workspaceRoot = findWorkspaceRoot();
@@ -207045,9 +207053,9 @@ ${lanes.join("\n")}
207045
207053
  function checkDeprecations(deprecatedIn, stopsWorkingIn, removedIn, createDiagnostic, fn2) {
207046
207054
  const deprecatedInVersion = new Version(deprecatedIn);
207047
207055
  const removedInVersion = new Version(removedIn);
207048
- const typescriptVersion2 = new Version(typeScriptVersion3 || versionMajorMinor);
207056
+ const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor);
207049
207057
  const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion();
207050
- const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion2) === 1);
207058
+ const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1);
207051
207059
  const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1;
207052
207060
  if (mustBeRemoved || canBeSilenced) {
207053
207061
  fn2((name2, value2, useInstead) => {
@@ -421380,9 +421388,9 @@ ${lanes.join("\n")}
421380
421388
  function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn2) {
421381
421389
  const deprecatedInVersion = new Version(deprecatedIn);
421382
421390
  const removedInVersion = new Version(removedIn);
421383
- const typescriptVersion2 = new Version(typeScriptVersion3 || versionMajorMinor);
421391
+ const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor);
421384
421392
  const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion();
421385
- const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion2) === 1);
421393
+ const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1);
421386
421394
  const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1;
421387
421395
  if (mustBeRemoved || canBeSilenced) {
421388
421396
  fn2((name2, value2, useInstead) => {
@@ -606028,7 +606036,7 @@ var require_package8 = __commonJS({
606028
606036
  "packages/cloudflare-tools/package.json"(exports2, module2) {
606029
606037
  module2.exports = {
606030
606038
  name: "@storm-software/cloudflare-tools",
606031
- version: "0.24.1",
606039
+ version: "0.26.0",
606032
606040
  type: "commonjs",
606033
606041
  description: "\u26A1The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
606034
606042
  repository: {
@@ -753548,7 +753556,7 @@ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
753548
753556
  };
753549
753557
 
753550
753558
  // packages/workspace-tools/src/base/base-executor.ts
753551
- var withRunExecutor = (name2, executorFn, executorOptions) => async (_options, context) => {
753559
+ var withRunExecutor = (name2, executorFn, executorOptions = {}) => async (_options, context) => {
753552
753560
  const {
753553
753561
  getStopwatch: getStopwatch2,
753554
753562
  writeDebug: writeDebug2,
@@ -753776,7 +753784,6 @@ var import_generator = __toESM(require_generator());
753776
753784
 
753777
753785
  // packages/workspace-tools/src/utils/versions.ts
753778
753786
  var typesNodeVersion = "20.9.0";
753779
- var typescriptVersion = "~5.2.2";
753780
753787
  var nxVersion = "^18.0.4";
753781
753788
  var nodeVersion = "20.11.0";
753782
753789
  var pnpmVersion = "8.10.2";
@@ -766117,7 +766124,7 @@ async function presetGeneratorFn(tree, options) {
766117
766124
  ];
766118
766125
  json.homepage ??= "https://stormsoftware.com";
766119
766126
  json.bugs ??= {
766120
- url: "https://stormsoftware.com/support",
766127
+ url: `https://github.com/${options.organization}/${options.name}/issues`,
766121
766128
  email: "support@stormsoftware.com"
766122
766129
  };
766123
766130
  json.license = "Apache-2.0";
@@ -766126,17 +766133,49 @@ async function presetGeneratorFn(tree, options) {
766126
766133
  email: "contact@stormsoftware.com",
766127
766134
  url: "https://stormsoftware.com"
766128
766135
  };
766136
+ json.maintainers ??= [
766137
+ {
766138
+ "name": "Storm Software",
766139
+ "email": "contact@stormsoftware.com",
766140
+ "url": "https://stormsoftware.com"
766141
+ },
766142
+ {
766143
+ "name": "Pat Sullivan",
766144
+ "email": "pat@stormsoftware.com",
766145
+ "url": "https://patsullivan.org"
766146
+ }
766147
+ ];
766129
766148
  json.funding ??= {
766130
766149
  type: "github",
766131
766150
  url: "https://github.com/sponsors/storm-software"
766132
766151
  };
766133
766152
  json.namespace ??= `@${options.namespace}`;
766134
766153
  json.description ??= options.description;
766135
- options.repositoryUrl ??= `https://github.com/${options.organization}/${options.name}}`;
766154
+ options.repositoryUrl ??= `https://github.com/${options.organization}/${options.name}`;
766136
766155
  json.repository ??= {
766137
766156
  type: "github",
766138
766157
  url: `${options.repositoryUrl}.git`
766139
766158
  };
766159
+ json.packageManager ??= "pnpm@9.6.0";
766160
+ json.engines ??= {
766161
+ "node": ">=20.11.0",
766162
+ "pnpm": ">=9.6.0"
766163
+ };
766164
+ json.devEngines ??= {
766165
+ "node": "20.x || 21.x"
766166
+ };
766167
+ json.nx ??= {
766168
+ "includedScripts": [
766169
+ "lint-ls",
766170
+ "lint",
766171
+ "format",
766172
+ "format-readme",
766173
+ "format-prettier",
766174
+ "format-toml",
766175
+ "commit",
766176
+ "release"
766177
+ ]
766178
+ };
766140
766179
  json.scripts.adr = "pnpm log4brains adr new";
766141
766180
  json.scripts["adr-preview"] = "pnpm log4brains preview";
766142
766181
  json.scripts.prepare = "pnpm add lefthook -w && pnpm lefthook install";
@@ -766193,25 +766232,6 @@ async function presetGeneratorFn(tree, options) {
766193
766232
  node: `>=${nodeVersion}`,
766194
766233
  pnpm: `>=${pnpmVersion}`
766195
766234
  };
766196
- if (options.includeApps) {
766197
- json.bundlewatch = {
766198
- files: [
766199
- {
766200
- path: "dist/*/*.js",
766201
- maxSize: "200kB"
766202
- }
766203
- ],
766204
- ci: {
766205
- trackBranches: ["main", "alpha", "beta"]
766206
- }
766207
- };
766208
- json.nextBundleAnalysis = {
766209
- buildOutputDirectory: "dist/apps/web/app/.next"
766210
- };
766211
- }
766212
- json.nx = {
766213
- includedScripts: ["lint", "format"]
766214
- };
766215
766235
  return json;
766216
766236
  });
766217
766237
  (0, import_devkit10.generateFiles)(tree, path8.join(__dirname, "files"), projectRoot, {
@@ -766221,15 +766241,15 @@ async function presetGeneratorFn(tree, options) {
766221
766241
  });
766222
766242
  await (0, import_devkit10.formatFiles)(tree);
766223
766243
  let dependencies = {
766224
- "@commitlint/cli": "19.2.1",
766225
766244
  "@ls-lint/ls-lint": "2.2.3",
766226
766245
  "@ltd/j-toml": "1.38.0",
766227
- "@nx/devkit": "19.1.0",
766228
- "@nx/esbuild": "19.1.0",
766229
- "@nx/eslint": "19.1.0",
766230
- "@nx/js": "19.1.0",
766231
- "@nx/plugin": "19.1.0",
766232
- "@nx/workspace": "19.1.0",
766246
+ "@microsoft/tsdoc": "0.15.0",
766247
+ "@nx/devkit": "^19.5.3",
766248
+ "@nx/esbuild": "19.5.3",
766249
+ "@nx/eslint-plugin": ">=19.5.3",
766250
+ "@nx/js": "^19.5.3",
766251
+ "@nx/plugin": "19.5.3",
766252
+ "@nx/workspace": "^19.5.3",
766233
766253
  "@storm-software/config": "latest",
766234
766254
  "@storm-software/config-tools": "latest",
766235
766255
  "@storm-software/git-tools": "latest",
@@ -766239,44 +766259,35 @@ async function presetGeneratorFn(tree, options) {
766239
766259
  "@storm-software/eslint": "latest",
766240
766260
  "@storm-software/eslint-plugin": "latest",
766241
766261
  "@storm-software/prettier": "latest",
766242
- "@swc-node/register": "1.9.0",
766243
- "@swc/cli": "0.3.12",
766244
- "@swc/core": "1.4.12",
766245
- "@swc/helpers": "0.5.8",
766246
- "@swc/wasm": "1.4.12",
766247
766262
  "@taplo/cli": "0.7.0",
766248
766263
  "@types/jest": "29.5.12",
766249
- "@types/node": "20.12.5",
766250
- "conventional-changelog-conventionalcommits": "7.0.2",
766251
- "esbuild": "0.20.2",
766264
+ "@types/node": "^20.14.10",
766265
+ "conventional-changelog-conventionalcommits": "8.0.0",
766266
+ "copyfiles": "2.4.1",
766267
+ "esbuild": "0.21.5",
766252
766268
  "esbuild-register": "3.5.0",
766253
- "eslint": "^9.0.0",
766254
- "eslint-config-storm-software": "latest",
766255
- "eslint-plugin-import": "^2.29.1",
766256
- "eslint-plugin-jsx-a11y": "^6.8.0",
766257
- "eslint-plugin-react": "^7.34.1",
766258
- "eslint-plugin-react-hooks": "^4.6.0",
766269
+ "eslint": "9.5.0",
766259
766270
  "jest": "29.7.0",
766260
766271
  "jest-environment-jsdom": "29.7.0",
766261
766272
  "jest-environment-node": "29.7.0",
766262
- "lefthook": "1.6.8",
766263
- "nx": "19.1.0",
766264
- "prettier": "3.2.5",
766265
- "rimraf": "5.0.5",
766266
- "ts-jest": "29.1.2",
766273
+ "knip": "5.25.2",
766274
+ "lefthook": "1.6.18",
766275
+ "nx": "^19.5.3",
766276
+ "prettier": "3.3.2",
766277
+ "prettier-plugin-prisma": "5.0.0",
766278
+ "rimraf": "5.0.7",
766279
+ "sherif": "0.10.0",
766280
+ "ts-jest": "29.1.5",
766267
766281
  "ts-loader": "9.5.1",
766268
766282
  "ts-node": "10.9.2",
766269
766283
  "tsconfig-paths": "4.2.0",
766270
- "tslib": "2.6.2",
766271
- "typescript": typescriptVersion,
766272
- "verdaccio": "5.30.3",
766273
- "knip": "5.25.2",
766274
- "sherif": "0.10.0"
766284
+ "tslib": "2.6.3",
766285
+ "typescript": "5.5.3",
766286
+ "verdaccio": "5.31.1"
766275
766287
  };
766276
766288
  if (options.includeApps) {
766277
766289
  dependencies = {
766278
766290
  ...dependencies,
766279
- bundlewatch: "latest",
766280
766291
  react: "latest",
766281
766292
  "react-dom": "latest",
766282
766293
  storybook: "latest",
@@ -767121,7 +767132,7 @@ var executor_default10 = withRunExecutor(
767121
767132
  // packages/cloudflare-tools/src/generators/init/generator.ts
767122
767133
  var import_devkit15 = require("@nx/devkit");
767123
767134
  var import_js2 = __toESM(require_src());
767124
- var import_versions5 = __toESM(require_versions3());
767135
+ var import_versions4 = __toESM(require_versions3());
767125
767136
 
767126
767137
  // packages/cloudflare-tools/src/generators/init/libs/versions.ts
767127
767138
  var cloudflareToolsVersion = require_package8().version;
@@ -767154,7 +767165,7 @@ function updateDependencies(tree, schema) {
767154
767165
  return (0, import_devkit15.addDependenciesToPackageJson)(
767155
767166
  tree,
767156
767167
  {
767157
- tslib: import_versions5.tslibVersion,
767168
+ tslib: import_versions4.tslibVersion,
767158
767169
  ...honoPackage
767159
767170
  },
767160
767171
  {
@@ -767185,7 +767196,7 @@ var vitestScript = `"test": "vitest run"`;
767185
767196
 
767186
767197
  // packages/cloudflare-tools/src/generators/worker/generator.ts
767187
767198
  var import_project_name_and_root_utils2 = require("@nx/devkit/src/generators/project-name-and-root-utils");
767188
- var import_versions7 = __toESM(require_versions3());
767199
+ var import_versions6 = __toESM(require_versions3());
767189
767200
  async function applicationGenerator(tree, schema) {
767190
767201
  const {
767191
767202
  getStopwatch: getStopwatch2,
@@ -767236,7 +767247,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[
767236
767247
  if (options.unitTestRunner === "vitest") {
767237
767248
  const { vitestGenerator, createOrEditViteConfig } = (0, import_devkit16.ensurePackage)(
767238
767249
  "@nx/vite",
767239
- import_versions7.nxVersion
767250
+ import_versions6.nxVersion
767240
767251
  );
767241
767252
  const vitestTask = await vitestGenerator(tree, {
767242
767253
  project: options.name,