@raisenow/tamaro-cli 1.8.0-dev.1 → 1.8.0-dev.2

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.
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env sh
2
+
3
+ corepack enable pnpm
4
+ corepack prepare --activate
5
+
6
+ pnpm lint-staged
@@ -18,15 +18,9 @@ definitions:
18
18
  initialize: &initialize |-
19
19
  corepack enable pnpm
20
20
  corepack prepare --activate
21
+ npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN_READ_ONLY
22
+ pnpm install --prefer-offline
21
23
  steps:
22
- - step: &install
23
- name: Install dependencies
24
- caches:
25
- - node
26
- - pnpm
27
- script:
28
- - *initialize
29
- - pnpm install --prefer-offline
30
24
  - step: &check
31
25
  name: Check
32
26
  caches:
@@ -43,5 +37,4 @@ definitions:
43
37
 
44
38
  pipelines:
45
39
  default:
46
- - step: *install
47
40
  - step: *check
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as promptConfirmation, D as logError, E as logDataTable, O as logSuccess, S as halt, T as logCommand, _ as getWidgetUuid, a as AWS_S3_BUCKET_TAMARO, c as CORE_CONFIG_NAME, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, h as getPaths, i as AWS_CLOUDFRONT_DISTRIBUTION_ID, k as logTitle, l as DEFAULT_PORT, m as getIfCoreFns, n as assertEnvValid, o as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD, s as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, t as applyEnv, u as DEFAULT_TAG, w as runCommandSync, x as resolveOwn, y as resolveBin } from "./env-BrLTVK6y.js";
2
+ import { C as promptConfirmation, D as logError, E as logDataTable, O as logSuccess, S as halt, T as logCommand, _ as getWidgetUuid, a as AWS_S3_BUCKET_TAMARO, c as CORE_CONFIG_NAME, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, h as getPaths, i as AWS_CLOUDFRONT_DISTRIBUTION_ID, k as logTitle, l as DEFAULT_PORT, m as getIfCoreFns, n as assertEnvValid, o as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_PROD, s as AWS_S3_BUCKET_TAMARO_EMAIL_CONFIG_STAGE, t as applyEnv, u as DEFAULT_TAG, w as runCommandSync, x as resolveOwn, y as resolveBin } from "./env-B20cxmcB.js";
3
3
  import { createCommand } from "commander";
4
4
  import fs, { existsSync, mkdirSync, renameSync } from "node:fs";
5
5
  import path from "node:path";
@@ -621,13 +621,7 @@ const unarchive = (options) => {
621
621
  assertIsArchived();
622
622
  const configName = getWidgetUuid();
623
623
  const cwd = process.cwd();
624
- /**
625
- * _archived/
626
- */
627
624
  const archivedDir = path.dirname(cwd);
628
- /**
629
- * parent of _archived/
630
- */
631
625
  const configsDir = path.dirname(archivedDir);
632
626
  const restoreTarget = path.resolve(configsDir, configName);
633
627
  assertRestoreTargetDoesNotExist(restoreTarget);
@@ -795,7 +789,7 @@ const promptBucketTamaroEmailConfig = async () => {
795
789
  //#endregion
796
790
  //#region package.json
797
791
  var name = "@raisenow/tamaro-cli";
798
- var version = "1.8.0-dev.1";
792
+ var version = "1.8.0-dev.2";
799
793
  //#endregion
800
794
  //#region src/cli.ts
801
795
  /**
@@ -68,9 +68,6 @@ const TAMARO_CORE_PACKAGE_NAMES = ["@raisenow/tamaro-core"];
68
68
  const TAMARO_CONFIGURATIONS_PACKAGE_NAMES = ["@raisenow/tamaro-configurations"];
69
69
  const TAMARO_SELF_SERVICE_PACKAGE_NAMES = ["@raisenow/tamaro-self-service"];
70
70
  const resolveApp = (relativePath) => path.resolve(realpathSync(process.cwd()), relativePath);
71
- /**
72
- * __dirname is "dist" in runtime
73
- */
74
71
  const resolveOwn = (relativePath) => path.resolve(__dirname, "..", relativePath);
75
72
  const resolveModule = (resolveFn, filePath) => {
76
73
  const extension = moduleFileExtensions.find((extension) => existsSync(resolveFn(`${filePath}.${extension}`)));
@@ -107,6 +104,27 @@ const resolveBin = (name) => {
107
104
  return path.join(dir, binPath);
108
105
  };
109
106
  const getWidgetUuid = () => path.basename(resolveApp("."));
107
+ /**
108
+ * Get the appropriate tsconfig file.
109
+ * Prefers tsconfig.app.json (composite config structure) but falls back to
110
+ * tsconfig.json for backwards compatibility with older versions.
111
+ */
112
+ const getTsConfigPath = () => {
113
+ const appTsConfig = resolveApp("tsconfig.app.json");
114
+ if (existsSync(appTsConfig)) return appTsConfig;
115
+ return resolveApp("tsconfig.json");
116
+ };
117
+ /**
118
+ * Get the appropriate tailwind config file.
119
+ * Prefers tailwind.config.cjs (for ESM compatibility) but falls back to
120
+ * tailwind.config.js for backwards compatibility.
121
+ */
122
+ const getTailwindConfigPath = () => {
123
+ const cjsConfig = resolveApp("tailwind.config.cjs");
124
+ if (existsSync(cjsConfig)) return cjsConfig;
125
+ const jsConfig = resolveApp("tailwind.config.js");
126
+ if (existsSync(jsConfig)) return jsConfig;
127
+ };
110
128
  const getPaths = (ifCore) => {
111
129
  return ifCore({
112
130
  root: resolveApp("."),
@@ -114,10 +132,10 @@ const getPaths = (ifCore) => {
114
132
  appEntry: resolveModule(resolveApp, "src/index"),
115
133
  appDist: resolveApp("dist"),
116
134
  appNodeModules: resolveApp("node_modules"),
117
- appTsConfig: resolveApp("tsconfig.json"),
135
+ appTsConfig: getTsConfigPath(),
118
136
  appHtml: resolveApp("src/*.html"),
119
137
  appEnv: resolveApp(".env*"),
120
- appTailwindConfig: resolveApp("tailwind.config.js")
138
+ appTailwindConfig: getTailwindConfigPath()
121
139
  }, {
122
140
  root: resolveApp("../.."),
123
141
  app: resolveApp("."),
@@ -1,4 +1,4 @@
1
- import { E as logDataTable, b as resolveEslintPluginConfig, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, g as getRelativePaths, h as getPaths, k as logTitle, m as getIfCoreFns, p as extensions, r as getEnvVars, v as resolveApp } from "./env-BrLTVK6y.js";
1
+ import { E as logDataTable, b as resolveEslintPluginConfig, d as HTTPS_CRT_FILE, f as HTTPS_KEY_FILE, g as getRelativePaths, h as getPaths, k as logTitle, m as getIfCoreFns, p as extensions, r as getEnvVars, v as resolveApp } from "./env-B20cxmcB.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
@@ -0,0 +1,30 @@
1
+ import {
2
+ baseConfig,
3
+ defineConfig,
4
+ GLOB_MARKDOWN,
5
+ GLOB_SRC,
6
+ OFF,
7
+ } from '@rnw-npm/eslint-config'
8
+
9
+ export default defineConfig([
10
+ ...baseConfig,
11
+
12
+ /**
13
+ * "tamaro-cli" specific overrides.
14
+ */
15
+ {
16
+ files: [GLOB_SRC],
17
+ name: 'tamaro-cli/overrides/ts',
18
+ rules: {
19
+ 'jsdoc/convert-to-jsdoc-comments': OFF,
20
+ 'no-useless-assignment': OFF,
21
+ },
22
+ },
23
+ {
24
+ files: [GLOB_MARKDOWN],
25
+ name: 'tamaro-cli/overrides/md',
26
+ rules: {
27
+ 'markdown/no-multiple-h1': OFF,
28
+ },
29
+ },
30
+ ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.8.0-dev.1",
3
+ "version": "1.8.0-dev.2",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
@@ -54,7 +54,7 @@
54
54
  "html-loader": "^5.1.0",
55
55
  "html-webpack-plugin": "^5.6.6",
56
56
  "json-loader": "^0.5.7",
57
- "lodash": "^4.17.23",
57
+ "lodash": "^4.17.21",
58
58
  "mini-css-extract-plugin": "^2.10.2",
59
59
  "node-notifier": "^10.0.1",
60
60
  "portfinder": "^1.0.38",
@@ -82,12 +82,20 @@
82
82
  "yaml-loader": "^0.9.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@rnw-npm/eslint-config": "^1.0.1",
85
+ "@rnw-npm/eslint-config": "2.0.0-dev.1",
86
86
  "@rnw-npm/prettier-config": "^1.0.0",
87
- "eslint": "^9.39.4",
87
+ "eslint": "^10.1.0",
88
+ "husky": "^9.1.7",
89
+ "lint-staged": "^16.4.0",
88
90
  "prettier": "^3.8.1"
89
91
  },
90
92
  "prettier": "@rnw-npm/prettier-config",
93
+ "lint-staged": {
94
+ "*.{js,jsx,ts,tsx,json,css,scss,md,yml,yaml}": [
95
+ "eslint --fix",
96
+ "prettier --write"
97
+ ]
98
+ },
91
99
  "scripts": {
92
100
  "typecheck": "tsc --noEmit",
93
101
  "build": "tsdown",
package/vitest.config.ts CHANGED
@@ -4,9 +4,9 @@ export default defineConfig({
4
4
  test: {
5
5
  coverage: {
6
6
  exclude: [
7
+ //
7
8
  'dist/**',
8
- '.eslintrc.cjs',
9
- '.prettierrc.cjs',
9
+ 'eslint.config.js',
10
10
  'vitest.config.ts',
11
11
  ],
12
12
  provider: 'v8',
package/eslint.config.js DELETED
@@ -1,17 +0,0 @@
1
- // @ts-check
2
- import baseConfig from '@rnw-npm/eslint-config'
3
- import {defineConfig} from 'eslint/config'
4
-
5
- export default defineConfig([
6
- ...baseConfig,
7
-
8
- /**
9
- * "tamaro-cli" specific overrides.
10
- */
11
- {
12
- name: 'tamaro-cli/overrides',
13
- rules: {
14
- 'markdown/no-multiple-h1': 0,
15
- },
16
- },
17
- ])