@flowcore/cli 4.7.2 → 4.8.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
@@ -10,6 +10,20 @@
10
10
 
11
11
  * added description to start that includes week ([58687a7](https://github.com/flowcore-io/flowcore-cli/commit/58687a7bbb66aaa5d6da26af88e555cbb1e72467))
12
12
 
13
+ ## [4.8.0](https://github.com/flowcore-io/flowcore-cli/compare/v4.7.2...v4.8.0) (2024-10-23)
14
+
15
+
16
+ ### Features
17
+
18
+ * **configuration:** :bug: fixed hook spec ([c0243cc](https://github.com/flowcore-io/flowcore-cli/commit/c0243ccb36022a9429300c858409633df52d3c2e))
19
+ * **configuration:** :sparkles: added support for [@jsr](https://github.com/jsr) in using the datadir ([364dc6b](https://github.com/flowcore-io/flowcore-cli/commit/364dc6b60678e608c95b8a2db766ca82596dacf4))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **configuration:** :bug: fixed filename to kebabcase ([b32c2dc](https://github.com/flowcore-io/flowcore-cli/commit/b32c2dc9c04e46960bb2e203cb76cf5bc5df27b5))
25
+ * **configuration:** :bug: fixed test ([5ca549f](https://github.com/flowcore-io/flowcore-cli/commit/5ca549f91969c78c6dad1ae794c4084ed4d375f9))
26
+
13
27
  ## [4.7.2](https://github.com/flowcore-io/flowcore-cli/compare/v4.7.1...v4.7.2) (2024-10-23)
14
28
 
15
29
 
package/README.md CHANGED
@@ -18,7 +18,7 @@ $ npm install -g @flowcore/cli
18
18
  $ flowcore COMMAND
19
19
  running command...
20
20
  $ flowcore (--version)
21
- @flowcore/cli/4.7.2 linux-x64 node-v20.18.0
21
+ @flowcore/cli/4.8.0 linux-x64 node-v20.18.0
22
22
  $ flowcore --help [COMMAND]
23
23
  USAGE
24
24
  $ flowcore COMMAND
@@ -97,7 +97,7 @@ EXAMPLES
97
97
  $ flowcore apply -f ./path/to/manifest.yml
98
98
  ```
99
99
 
100
- _See code: [src/commands/apply.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.7.2/src/commands/apply.ts)_
100
+ _See code: [src/commands/apply.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.8.0/src/commands/apply.ts)_
101
101
 
102
102
  ## `flowcore auth delete key API_KEY_NAME`
103
103
 
@@ -481,7 +481,7 @@ EXAMPLES
481
481
  cat ./path/to/manifest.yml | flowcore delete -f -
482
482
  ```
483
483
 
484
- _See code: [src/commands/delete.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.7.2/src/commands/delete.ts)_
484
+ _See code: [src/commands/delete.ts](https://github.com/flowcore-io/flowcore-cli/blob/v4.8.0/src/commands/delete.ts)_
485
485
 
486
486
  ## `flowcore generate nextjs-entity NAME`
487
487
 
@@ -0,0 +1,3 @@
1
+ import { Hook } from '@oclif/core';
2
+ declare const hook: Hook<'init'>;
3
+ export default hook;
@@ -0,0 +1,22 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ const hook = async function (opts) {
4
+ try {
5
+ const npmrcPath = path.join(opts.config.dataDir, ".npmrc");
6
+ const jsrRegistry = "@jsr:registry=https://npm.jsr.io";
7
+ let npmrcContent = "";
8
+ try {
9
+ npmrcContent = fs.readFileSync(npmrcPath, "utf8");
10
+ }
11
+ catch {
12
+ fs.writeFileSync(npmrcPath, "", { flag: "wx" });
13
+ }
14
+ if (!npmrcContent.includes(jsrRegistry)) {
15
+ fs.appendFileSync(npmrcPath, `\n${jsrRegistry}\n`);
16
+ }
17
+ }
18
+ catch {
19
+ throw new Error(`Could not install JSR`);
20
+ }
21
+ };
22
+ export default hook;
@@ -102,5 +102,5 @@
102
102
  ]
103
103
  }
104
104
  },
105
- "version": "4.7.2"
105
+ "version": "4.8.0"
106
106
  }
package/package.json CHANGED
@@ -93,7 +93,10 @@
93
93
  "warnIfUpdateAvailable": {
94
94
  "timeoutInDays": 2
95
95
  },
96
- "topicSeparator": " "
96
+ "topicSeparator": " ",
97
+ "hooks": {
98
+ "init": "./dist/hooks/init/add-jsr"
99
+ }
97
100
  },
98
101
  "repository": "flowcore-io/flowcore-cli",
99
102
  "scripts": {
@@ -109,7 +112,7 @@
109
112
  "prestart": "npm run build",
110
113
  "update-schema": "rover graph introspect https://graph.api.staging.flowcore.io/graphql -o schema.gql"
111
114
  },
112
- "version": "4.7.2",
115
+ "version": "4.8.0",
113
116
  "bugs": "https://github.com/flowcore-io/flowcore-cli/issues",
114
117
  "keywords": [
115
118
  "flowcore",