create-feathersdev 0.12.0 → 0.13.1
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 +41 -95
- package/esm/actions/app.js +3 -3
- package/esm/actions/integrate.js +6 -4
- package/esm/actions/server.js +3 -3
- package/esm/base.js +5 -6
- package/esm/flows/check-login.js +3 -3
- package/esm/flows/with-application.js +7 -8
- package/esm/flows/with-organization.js +4 -4
- package/esm/index.js +2 -2
- package/package.json +11 -11
- package/examples/frontend/auth.ts +0 -39
- package/examples/frontend/react/.eslintrc.cjs +0 -18
- package/examples/frontend/react/README.md +0 -30
- package/examples/frontend/react/index.html +0 -13
- package/examples/frontend/react/package.json +0 -31
- package/examples/frontend/react/public/vite.svg +0 -1
- package/examples/frontend/react/src/App.css +0 -42
- package/examples/frontend/react/src/App.tsx +0 -34
- package/examples/frontend/react/src/Counter.tsx +0 -25
- package/examples/frontend/react/src/assets/react.svg +0 -1
- package/examples/frontend/react/src/auth.ts +0 -39
- package/examples/frontend/react/src/automerge.ts +0 -18
- package/examples/frontend/react/src/index.css +0 -68
- package/examples/frontend/react/src/main.tsx +0 -10
- package/examples/frontend/react/src/vite-env.d.ts +0 -1
- package/examples/frontend/react/tsconfig.app.json +0 -27
- package/examples/frontend/react/tsconfig.json +0 -11
- package/examples/frontend/react/tsconfig.node.json +0 -13
- package/examples/frontend/react/vite.config.ts +0 -8
- package/examples/frontend/svelte/.vscode/extensions.json +0 -3
- package/examples/frontend/svelte/README.md +0 -47
- package/examples/frontend/svelte/index.html +0 -13
- package/examples/frontend/svelte/package.json +0 -25
- package/examples/frontend/svelte/public/vite.svg +0 -1
- package/examples/frontend/svelte/src/App.svelte +0 -30
- package/examples/frontend/svelte/src/app.css +0 -79
- package/examples/frontend/svelte/src/assets/svelte.svg +0 -1
- package/examples/frontend/svelte/src/auth.ts +0 -33
- package/examples/frontend/svelte/src/main.ts +0 -9
- package/examples/frontend/svelte/src/vite-env.d.ts +0 -2
- package/examples/frontend/svelte/svelte.config.js +0 -7
- package/examples/frontend/svelte/tsconfig.json +0 -21
- package/examples/frontend/svelte/tsconfig.node.json +0 -12
- package/examples/frontend/svelte/vite.config.ts +0 -8
- package/examples/frontend/vanilla/index.html +0 -13
- package/examples/frontend/vanilla/package.json +0 -20
- package/examples/frontend/vanilla/public/vite.svg +0 -1
- package/examples/frontend/vanilla/src/auth.ts +0 -39
- package/examples/frontend/vanilla/src/automerge.ts +0 -16
- package/examples/frontend/vanilla/src/main.ts +0 -23
- package/examples/frontend/vanilla/src/style.css +0 -96
- package/examples/frontend/vanilla/src/vite-env.d.ts +0 -1
- package/examples/frontend/vanilla/tsconfig.json +0 -23
- package/examples/frontend/vanilla/vite.config.ts +0 -8
- package/examples/frontend/vue/.vscode/extensions.json +0 -3
- package/examples/frontend/vue/README.md +0 -33
- package/examples/frontend/vue/env.d.ts +0 -1
- package/examples/frontend/vue/index.html +0 -13
- package/examples/frontend/vue/package.json +0 -29
- package/examples/frontend/vue/public/favicon.ico +0 -0
- package/examples/frontend/vue/src/App.vue +0 -30
- package/examples/frontend/vue/src/assets/base.css +0 -86
- package/examples/frontend/vue/src/assets/logo.svg +0 -1
- package/examples/frontend/vue/src/assets/main.css +0 -35
- package/examples/frontend/vue/src/auth.ts +0 -39
- package/examples/frontend/vue/src/automerge.ts +0 -16
- package/examples/frontend/vue/src/main.ts +0 -6
- package/examples/frontend/vue/tsconfig.app.json +0 -14
- package/examples/frontend/vue/tsconfig.json +0 -11
- package/examples/frontend/vue/tsconfig.node.json +0 -19
- package/examples/frontend/vue/vite.config.ts +0 -18
- package/examples/server/bun/README.md +0 -15
- package/examples/server/bun/bun.lockb +0 -0
- package/examples/server/bun/package.json +0 -17
- package/examples/server/bun/src/authenticate.ts +0 -17
- package/examples/server/bun/src/index.ts +0 -54
- package/examples/server/bun/tsconfig.json +0 -27
- package/examples/server/cloudflare/.editorconfig +0 -12
- package/examples/server/cloudflare/.prettierrc +0 -6
- package/examples/server/cloudflare/package.json +0 -22
- package/examples/server/cloudflare/src/authenticate.ts +0 -17
- package/examples/server/cloudflare/src/index.ts +0 -50
- package/examples/server/cloudflare/test/index.spec.ts +0 -25
- package/examples/server/cloudflare/test/tsconfig.json +0 -8
- package/examples/server/cloudflare/tsconfig.json +0 -105
- package/examples/server/cloudflare/vitest.config.mts +0 -11
- package/examples/server/cloudflare/worker-configuration.d.ts +0 -4
- package/examples/server/cloudflare/wrangler.toml +0 -108
- package/examples/server/deno/deno.lock +0 -79
- package/examples/server/deno/package.json +0 -13
- package/examples/server/deno/src/authenticate.ts +0 -17
- package/examples/server/deno/src/server.ts +0 -51
- package/examples/server/express/package.json +0 -24
- package/examples/server/express/src/app.ts +0 -26
- package/examples/server/express/src/authenticate.ts +0 -51
- package/examples/server/express/tsconfig.json +0 -108
- package/examples/server/nodejs/package.json +0 -20
- package/examples/server/nodejs/src/authenticate.ts +0 -28
- package/examples/server/nodejs/src/server.ts +0 -38
- package/examples/server/nodejs/tsconfig.json +0 -108
package/CHANGELOG.md
CHANGED
|
@@ -3,160 +3,106 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [0.13.1](https://github.com/feathersdev/monorepo/compare/v0.13.0...v0.13.1) (2026-02-21)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package create-feathersdev
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Migrate to D1 ([#301](https://github.com/feathersdev/cloud/issues/301)) ([049fe52](https://github.com/feathersdev/cloud/commit/049fe52d22e1aae32c5b82c1618e4e2ff4193123)), closes [#302](https://github.com/feathersdev/cloud/issues/302) [#303](https://github.com/feathersdev/cloud/issues/303)
|
|
12
|
-
* Talon Auth ([#317](https://github.com/feathersdev/cloud/issues/317)) ([090eb19](https://github.com/feathersdev/cloud/commit/090eb19a26080ab5e1a219e2cbac1de19936541b))
|
|
13
|
-
* Upgrade to Feathers 6 ([#309](https://github.com/feathersdev/cloud/issues/309)) ([7ead81c](https://github.com/feathersdev/cloud/commit/7ead81cc0c87d7a7cf4143ff870bf7e2cad84de6))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## [0.11.4](https://github.com/feathersdev/cloud/compare/v0.11.3...v0.11.4) (2025-05-28)
|
|
20
|
-
|
|
10
|
+
# [0.13.0](https://github.com/feathersdev/monorepo/compare/v0.12.0...v0.13.0) (2026-02-21)
|
|
21
11
|
|
|
22
12
|
### Bug Fixes
|
|
23
13
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## [0.11.3](https://github.com/feathersdev/cloud/compare/v0.11.2...v0.11.3) (2025-05-26)
|
|
32
|
-
|
|
33
|
-
**Note:** Version bump only for package create-feathersdev
|
|
14
|
+
- **api:** Remove unnecessary secret id references ([#333](https://github.com/feathersdev/monorepo/issues/333)) ([b9ceef2](https://github.com/feathersdev/monorepo/commit/b9ceef22ba83682773c26e2480f1d9f96a73d29c))
|
|
15
|
+
- Fix build scripts and tests passing ([#347](https://github.com/feathersdev/monorepo/issues/347)) ([ea2de04](https://github.com/feathersdev/monorepo/commit/ea2de0409d6ceb5cbf8355bf65c0bd5aea927e22))
|
|
34
16
|
|
|
17
|
+
### Features
|
|
35
18
|
|
|
19
|
+
- **talon-auth:** Move to Lit web component ([#360](https://github.com/feathersdev/monorepo/issues/360)) ([d571981](https://github.com/feathersdev/monorepo/commit/d5719815fc6c2c8d137db1fef90a5ce96125ec3b))
|
|
36
20
|
|
|
21
|
+
# [0.12.0](https://github.com/feathersdev/monorepo/compare/v0.11.4...v0.12.0) (2025-11-04)
|
|
37
22
|
|
|
23
|
+
### Features
|
|
38
24
|
|
|
39
|
-
|
|
25
|
+
- Migrate to D1 ([#301](https://github.com/feathersdev/monorepo/issues/301)) ([049fe52](https://github.com/feathersdev/monorepo/commit/049fe52d22e1aae32c5b82c1618e4e2ff4193123)), closes [#302](https://github.com/feathersdev/monorepo/issues/302) [#303](https://github.com/feathersdev/monorepo/issues/303)
|
|
26
|
+
- Talon Auth ([#317](https://github.com/feathersdev/monorepo/issues/317)) ([090eb19](https://github.com/feathersdev/monorepo/commit/090eb19a26080ab5e1a219e2cbac1de19936541b))
|
|
27
|
+
- Upgrade to Feathers 6 ([#309](https://github.com/feathersdev/monorepo/issues/309)) ([7ead81c](https://github.com/feathersdev/monorepo/commit/7ead81cc0c87d7a7cf4143ff870bf7e2cad84de6))
|
|
40
28
|
|
|
29
|
+
## [0.11.4](https://github.com/feathersdev/monorepo/compare/v0.11.3...v0.11.4) (2025-05-28)
|
|
41
30
|
|
|
42
31
|
### Bug Fixes
|
|
43
32
|
|
|
44
|
-
|
|
33
|
+
- Add --app-id parameter to CLI to skip having to log in ([#293](https://github.com/feathersdev/monorepo/issues/293)) ([5188d43](https://github.com/feathersdev/monorepo/commit/5188d43817020d24e53670a6570382b0b1bf4057))
|
|
34
|
+
- Some usability tweaks for CLI and app ([#289](https://github.com/feathersdev/monorepo/issues/289)) ([3a241ff](https://github.com/feathersdev/monorepo/commit/3a241ffa6bf75154d437c8371478df6a5b5c0513))
|
|
45
35
|
|
|
36
|
+
## [0.11.3](https://github.com/feathersdev/monorepo/compare/v0.11.2...v0.11.3) (2025-05-26)
|
|
46
37
|
|
|
38
|
+
**Note:** Version bump only for package create-feathersdev
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## [0.11.1](https://github.com/feathersdev/cloud/compare/v0.11.0...v0.11.1) (2025-05-25)
|
|
51
|
-
|
|
40
|
+
## [0.11.2](https://github.com/feathersdev/monorepo/compare/v0.11.1...v0.11.2) (2025-05-26)
|
|
52
41
|
|
|
53
42
|
### Bug Fixes
|
|
54
43
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
- Change create-feathersdev to republish examples ([37b2092](https://github.com/feathersdev/monorepo/commit/37b209233b6645e9536b58c1c205d25a32c3605a))
|
|
58
45
|
|
|
46
|
+
## [0.11.1](https://github.com/feathersdev/monorepo/compare/v0.11.0...v0.11.1) (2025-05-25)
|
|
59
47
|
|
|
48
|
+
### Bug Fixes
|
|
60
49
|
|
|
61
|
-
|
|
50
|
+
- Update default development port ([#280](https://github.com/feathersdev/monorepo/issues/280)) ([bfcbefa](https://github.com/feathersdev/monorepo/commit/bfcbefaffe32bb7b1054540699519fc0d5f8dd33))
|
|
62
51
|
|
|
52
|
+
# [0.11.0](https://github.com/feathersdev/monorepo/compare/v0.10.1...v0.11.0) (2025-05-25)
|
|
63
53
|
|
|
64
54
|
### Features
|
|
65
55
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## [0.10.1](https://github.com/feathersdev/cloud/compare/v0.10.0...v0.10.1) (2025-05-16)
|
|
56
|
+
- Move CLI to create-feathersdev and update flows ([#279](https://github.com/feathersdev/monorepo/issues/279)) ([3b7cb26](https://github.com/feathersdev/monorepo/commit/3b7cb26a7170ceec5138243ca6016eed2cc10643))
|
|
73
57
|
|
|
58
|
+
## [0.10.1](https://github.com/feathersdev/monorepo/compare/v0.10.0...v0.10.1) (2025-05-16)
|
|
74
59
|
|
|
75
60
|
### Bug Fixes
|
|
76
61
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# [0.10.0](https://github.com/feathersdev/cloud/compare/v0.9.1...v0.10.0) (2025-05-16)
|
|
62
|
+
- **cli:** Fix feathersdev/auth package reference ([#274](https://github.com/feathersdev/monorepo/issues/274)) ([2a0d199](https://github.com/feathersdev/monorepo/commit/2a0d199fbb9d4ab9408535f6844bcce0c9ae9563))
|
|
84
63
|
|
|
64
|
+
# [0.10.0](https://github.com/feathersdev/monorepo/compare/v0.9.1...v0.10.0) (2025-05-16)
|
|
85
65
|
|
|
86
66
|
### Features
|
|
87
67
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## [0.9.1](https://github.com/feathersdev/cloud/compare/v0.9.0...v0.9.1) (2025-05-15)
|
|
68
|
+
- **auth:** Make type and class naming more consistent ([#273](https://github.com/feathersdev/monorepo/issues/273)) ([8e5ce70](https://github.com/feathersdev/monorepo/commit/8e5ce708e2ca995b7209cd4888e4a8d1bed29f38))
|
|
95
69
|
|
|
70
|
+
## [0.9.1](https://github.com/feathersdev/monorepo/compare/v0.9.0...v0.9.1) (2025-05-15)
|
|
96
71
|
|
|
97
72
|
### Bug Fixes
|
|
98
73
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
# [0.9.0](https://github.com/feathersdev/cloud/compare/v0.8.0...v0.9.0) (2025-05-15)
|
|
74
|
+
- Move to feathersdev/cli ([#272](https://github.com/feathersdev/monorepo/issues/272)) ([7062262](https://github.com/feathersdev/monorepo/commit/706226263db7b7f80f07200793559cf3e1988796))
|
|
106
75
|
|
|
76
|
+
# [0.9.0](https://github.com/feathersdev/monorepo/compare/v0.8.0...v0.9.0) (2025-05-15)
|
|
107
77
|
|
|
108
78
|
### Features
|
|
109
79
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
# [0.8.0](https://github.com/feathersdev/cloud/compare/v0.7.3...v0.8.0) (2025-04-26)
|
|
80
|
+
- Update to feathers.dev branding ([#270](https://github.com/feathersdev/monorepo/issues/270)) ([475f925](https://github.com/feathersdev/monorepo/commit/475f925fafe0072d8cdbe33009b5edee96f5a2de))
|
|
117
81
|
|
|
82
|
+
# [0.8.0](https://github.com/feathersdev/monorepo/compare/v0.7.3...v0.8.0) (2025-04-26)
|
|
118
83
|
|
|
119
84
|
### Features
|
|
120
85
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
86
|
+
- Refactor verification methods into services ([#268](https://github.com/feathersdev/monorepo/issues/268)) ([28d05d0](https://github.com/feathersdev/monorepo/commit/28d05d02e6e596652c5b32b1273768a43f343223))
|
|
124
87
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
## [0.7.3](https://github.com/feathersdev/cloud/compare/v0.7.2...v0.7.3) (2024-12-20)
|
|
88
|
+
## [0.7.3](https://github.com/feathersdev/monorepo/compare/v0.7.2...v0.7.3) (2024-12-20)
|
|
128
89
|
|
|
129
90
|
**Note:** Version bump only for package @featherscloud/cli
|
|
130
91
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
## [0.7.2](https://github.com/feathersdev/cloud/compare/v0.7.1...v0.7.2) (2024-12-16)
|
|
136
|
-
|
|
92
|
+
## [0.7.2](https://github.com/feathersdev/monorepo/compare/v0.7.1...v0.7.2) (2024-12-16)
|
|
137
93
|
|
|
138
94
|
### Bug Fixes
|
|
139
95
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
## [0.7.1](https://github.com/feathersdev/cloud/compare/v0.7.0...v0.7.1) (2024-12-12)
|
|
96
|
+
- **cli:** Fix CLI NodeJS example name ([#244](https://github.com/feathersdev/monorepo/issues/244)) ([726b113](https://github.com/feathersdev/monorepo/commit/726b113ef925d64b3af8900405dc496c9e8a7565))
|
|
147
97
|
|
|
98
|
+
## [0.7.1](https://github.com/feathersdev/monorepo/compare/v0.7.0...v0.7.1) (2024-12-12)
|
|
148
99
|
|
|
149
100
|
### Bug Fixes
|
|
150
101
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
# [0.7.0](https://github.com/feathersdev/cloud/compare/v0.6.5...v0.7.0) (2024-12-12)
|
|
102
|
+
- Update CLI package publish config ([7984758](https://github.com/feathersdev/monorepo/commit/7984758b661f6680762b34f6bb217111abc2bf71))
|
|
158
103
|
|
|
104
|
+
# [0.7.0](https://github.com/feathersdev/monorepo/compare/v0.6.5...v0.7.0) (2024-12-12)
|
|
159
105
|
|
|
160
106
|
### Features
|
|
161
107
|
|
|
162
|
-
|
|
108
|
+
- Feathers Cloud CLI ([#215](https://github.com/feathersdev/monorepo/issues/215)) ([18b7010](https://github.com/feathersdev/monorepo/commit/18b7010099c0be1e0ab7f2fa2262f87654c6c74b))
|
package/esm/actions/app.js
CHANGED
|
@@ -5,7 +5,7 @@ import { generateIntegration } from './integrate.js';
|
|
|
5
5
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
6
6
|
export function generateApp() {
|
|
7
7
|
return async (init) => Promise.resolve(init)
|
|
8
|
-
.then(prompt(ctx => ({
|
|
8
|
+
.then(prompt((ctx) => ({
|
|
9
9
|
framework: {
|
|
10
10
|
type: 'list',
|
|
11
11
|
message: 'Which framework do you want to use?',
|
|
@@ -31,8 +31,8 @@ export function generateApp() {
|
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
})))
|
|
34
|
-
.then(copyFiles(fromFile(__dirname, '..', '..', 'examples', 'frontend', ctx => ctx.framework), toFile(ctx => ctx.folder)))
|
|
35
|
-
.then(ctx => ({
|
|
34
|
+
.then(copyFiles(fromFile(__dirname, '..', '..', 'examples', 'frontend', (ctx) => ctx.framework), toFile((ctx) => ctx.folder)))
|
|
35
|
+
.then((ctx) => ({
|
|
36
36
|
...ctx,
|
|
37
37
|
integrationTypes: ['frontend'],
|
|
38
38
|
frontendFile: `${ctx.folder}/src/auth.ts`,
|
package/esm/actions/integrate.js
CHANGED
|
@@ -13,7 +13,7 @@ export function replaceFromFile(file, replacements) {
|
|
|
13
13
|
}
|
|
14
14
|
export function generateIntegration(force = false) {
|
|
15
15
|
return async (ctx) => Promise.resolve(ctx)
|
|
16
|
-
.then(prompt(ctx => ({
|
|
16
|
+
.then(prompt((ctx) => ({
|
|
17
17
|
integrationTypes: {
|
|
18
18
|
type: 'checkbox',
|
|
19
19
|
message: 'Which integrations would you like to generate?',
|
|
@@ -46,7 +46,7 @@ export function generateIntegration(force = false) {
|
|
|
46
46
|
when: !ctx.platform && ctx.integrationTypes.includes('backend'),
|
|
47
47
|
},
|
|
48
48
|
})))
|
|
49
|
-
.then(prompt(ctx => ({
|
|
49
|
+
.then(prompt((ctx) => ({
|
|
50
50
|
frontendFile: {
|
|
51
51
|
type: 'input',
|
|
52
52
|
message: 'Where should the frontend integration file be saved?',
|
|
@@ -60,8 +60,10 @@ export function generateIntegration(force = false) {
|
|
|
60
60
|
when: !ctx.backendFile && ctx.integrationTypes.includes('backend'),
|
|
61
61
|
},
|
|
62
62
|
})))
|
|
63
|
-
.then(when(ctx => !!ctx.frontendFile, renderTemplate(replaceFromFile(fromFile(__dirname, '..', '..', 'examples', 'frontend', 'auth.ts'), {
|
|
64
|
-
|
|
63
|
+
.then(when((ctx) => !!ctx.frontendFile, renderTemplate(replaceFromFile(fromFile(__dirname, '..', '..', 'examples', 'frontend', 'auth.ts'), {
|
|
64
|
+
'<your-app-id>': ctx.selectedApplication.id,
|
|
65
|
+
}), toFile((ctx) => ctx.frontendFile), { force })))
|
|
66
|
+
.then(when((ctx) => !!ctx.backendFile, renderTemplate(replaceFromFile(fromFile(__dirname, '..', '..', 'examples', 'server', (ctx) => ctx.platform, 'src', 'authenticate.ts'), { '<your-app-id>': ctx.selectedApplication.id }), toFile((ctx) => ctx.backendFile), { force })));
|
|
65
67
|
}
|
|
66
68
|
export const successMessage = `
|
|
67
69
|
Your feathers.dev auth app is now integrated. 🚀
|
package/esm/actions/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { generateIntegration } from './integrate.js';
|
|
|
5
5
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
6
6
|
export function generateServer() {
|
|
7
7
|
return async (init) => Promise.resolve(init)
|
|
8
|
-
.then(prompt(ctx => ({
|
|
8
|
+
.then(prompt((ctx) => ({
|
|
9
9
|
platform: {
|
|
10
10
|
type: 'list',
|
|
11
11
|
message: 'Which server platform do you want to use?',
|
|
@@ -24,8 +24,8 @@ export function generateServer() {
|
|
|
24
24
|
default: ctx.selectedApplication?.name?.toLowerCase(),
|
|
25
25
|
},
|
|
26
26
|
})))
|
|
27
|
-
.then(copyFiles(fromFile(__dirname, '..', '..', 'examples', 'server', ctx => ctx.platform), toFile(ctx => ctx.folder)))
|
|
28
|
-
.then(ctx => ({
|
|
27
|
+
.then(copyFiles(fromFile(__dirname, '..', '..', 'examples', 'server', (ctx) => ctx.platform), toFile((ctx) => ctx.folder)))
|
|
28
|
+
.then((ctx) => ({
|
|
29
29
|
...ctx,
|
|
30
30
|
integrationTypes: ['backend'],
|
|
31
31
|
backendFile: `${ctx.folder}/src/authenticate.ts`,
|
package/esm/base.js
CHANGED
|
@@ -2,7 +2,9 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { getContext } from '@featherscloud/pinion';
|
|
5
|
-
import {
|
|
5
|
+
import { feathers } from '@feathersjs/feathers';
|
|
6
|
+
import rest from '@feathersjs/rest-client';
|
|
7
|
+
import { createClient, TalonApiClient } from 'talon-auth';
|
|
6
8
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
7
9
|
// Read the package.json file
|
|
8
10
|
export const packageJson = JSON.parse(readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
|
|
@@ -19,14 +21,11 @@ export function getUserAgent() {
|
|
|
19
21
|
export async function getBaseContext(options, init = {}) {
|
|
20
22
|
const ctx = getContext(init);
|
|
21
23
|
const { appId, store, apiUrl, referer } = options;
|
|
22
|
-
const api =
|
|
23
|
-
'User-Agent': getUserAgent(),
|
|
24
|
-
'Referer': referer,
|
|
25
|
-
});
|
|
24
|
+
const api = feathers().configure(rest('/').fetch(fetch));
|
|
26
25
|
const auth = createClient({
|
|
27
26
|
appId,
|
|
28
27
|
store,
|
|
29
|
-
api,
|
|
28
|
+
api: new TalonApiClient(apiUrl, { Referrer: referer }),
|
|
30
29
|
});
|
|
31
30
|
const device = await auth.getDevice();
|
|
32
31
|
const user = await auth.getUser();
|
package/esm/flows/check-login.js
CHANGED
|
@@ -3,10 +3,10 @@ import chalk from 'chalk';
|
|
|
3
3
|
import { LoginRequiredError } from 'talon-auth';
|
|
4
4
|
export async function performLogin(init) {
|
|
5
5
|
return Promise.resolve(init)
|
|
6
|
-
.then(prompt(ctx => ({
|
|
6
|
+
.then(prompt((ctx) => ({
|
|
7
7
|
email: {
|
|
8
8
|
type: 'input',
|
|
9
|
-
message:
|
|
9
|
+
message: "Let's get you signed in! Please enter your email address",
|
|
10
10
|
default: ctx.user?.email,
|
|
11
11
|
when: !ctx.email,
|
|
12
12
|
},
|
|
@@ -26,7 +26,7 @@ export async function performLogin(init) {
|
|
|
26
26
|
verificationId: id,
|
|
27
27
|
};
|
|
28
28
|
})
|
|
29
|
-
.then(prompt(ctx => ({
|
|
29
|
+
.then(prompt((ctx) => ({
|
|
30
30
|
code: {
|
|
31
31
|
type: 'input',
|
|
32
32
|
message: `Please enter the verification code we sent to ${chalk.bold(ctx.email)}`,
|
|
@@ -3,8 +3,8 @@ import chalk from 'chalk';
|
|
|
3
3
|
import { withOrganization } from './with-organization.js';
|
|
4
4
|
export async function createApplication(init) {
|
|
5
5
|
return Promise.resolve(init)
|
|
6
|
-
.then(loadJSON(fromFile('package.json'), pkg => ({ pkg }), {}))
|
|
7
|
-
.then(prompt(ctx => ({
|
|
6
|
+
.then(loadJSON(fromFile('package.json'), (pkg) => ({ pkg }), {}))
|
|
7
|
+
.then(prompt((ctx) => ({
|
|
8
8
|
appName: {
|
|
9
9
|
type: 'input',
|
|
10
10
|
message: 'What is the name of your application?',
|
|
@@ -21,7 +21,7 @@ export async function createApplication(init) {
|
|
|
21
21
|
const application = await ctx.api.service('applications').create({
|
|
22
22
|
name: ctx.appName,
|
|
23
23
|
organizationId: ctx.selectedOrganization.id,
|
|
24
|
-
referrers: ctx.referers.split(',').map(r => r.trim()),
|
|
24
|
+
referrers: ctx.referers.split(',').map((r) => r.trim()),
|
|
25
25
|
}, {
|
|
26
26
|
headers: {
|
|
27
27
|
Authorization: ctx.authorization,
|
|
@@ -35,8 +35,7 @@ export async function createApplication(init) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
export async function withApplication(init) {
|
|
38
|
-
return Promise.resolve(init)
|
|
39
|
-
.then((ctx) => {
|
|
38
|
+
return Promise.resolve(init).then((ctx) => {
|
|
40
39
|
if (ctx.appId) {
|
|
41
40
|
return {
|
|
42
41
|
...ctx,
|
|
@@ -66,7 +65,7 @@ export async function withRemoteApplication(init) {
|
|
|
66
65
|
applications,
|
|
67
66
|
};
|
|
68
67
|
})
|
|
69
|
-
.then(prompt(ctx => ({
|
|
68
|
+
.then(prompt((ctx) => ({
|
|
70
69
|
selectedApplication: {
|
|
71
70
|
type: 'list',
|
|
72
71
|
message: 'Which application do you want to use?',
|
|
@@ -76,7 +75,7 @@ export async function withRemoteApplication(init) {
|
|
|
76
75
|
name: 'Create a new application',
|
|
77
76
|
value: '',
|
|
78
77
|
},
|
|
79
|
-
...ctx.applications.map(app => ({
|
|
78
|
+
...ctx.applications.map((app) => ({
|
|
80
79
|
name: app.name,
|
|
81
80
|
value: app.id,
|
|
82
81
|
})),
|
|
@@ -87,7 +86,7 @@ export async function withRemoteApplication(init) {
|
|
|
87
86
|
if (!ctx.selectedApplication) {
|
|
88
87
|
return createApplication(ctx);
|
|
89
88
|
}
|
|
90
|
-
const app = ctx.applications.find(a => a.id === ctx.selectedApplication);
|
|
89
|
+
const app = ctx.applications.find((a) => a.id === ctx.selectedApplication);
|
|
91
90
|
return {
|
|
92
91
|
...ctx,
|
|
93
92
|
selectedApplication: app,
|
|
@@ -2,7 +2,7 @@ import { prompt } from '@featherscloud/pinion';
|
|
|
2
2
|
import { checkLogin } from './check-login.js';
|
|
3
3
|
export async function createOrganization(init) {
|
|
4
4
|
return Promise.resolve(init)
|
|
5
|
-
.then(prompt(ctx => ({
|
|
5
|
+
.then(prompt((ctx) => ({
|
|
6
6
|
orgName: {
|
|
7
7
|
type: 'input',
|
|
8
8
|
message: 'What is the name of your organization?',
|
|
@@ -48,18 +48,18 @@ export async function withOrganization(init) {
|
|
|
48
48
|
}
|
|
49
49
|
if (ctx.organizations.length > 1) {
|
|
50
50
|
return Promise.resolve(ctx)
|
|
51
|
-
.then(prompt(ctx => ({
|
|
51
|
+
.then(prompt((ctx) => ({
|
|
52
52
|
selectedOrganization: {
|
|
53
53
|
type: 'list',
|
|
54
54
|
message: 'Which organizations do you want to use?',
|
|
55
|
-
choices: ctx.organizations.map(organization => ({
|
|
55
|
+
choices: ctx.organizations.map((organization) => ({
|
|
56
56
|
name: organization.name,
|
|
57
57
|
value: organization.id,
|
|
58
58
|
})),
|
|
59
59
|
},
|
|
60
60
|
})))
|
|
61
61
|
.then((ctx) => {
|
|
62
|
-
const org = ctx.organizations.find(organization => organization.id === ctx.selectedOrganization);
|
|
62
|
+
const org = ctx.organizations.find((organization) => organization.id === ctx.selectedOrganization);
|
|
63
63
|
return {
|
|
64
64
|
...ctx,
|
|
65
65
|
selectedOrganization: org,
|
package/esm/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import { logout } from './actions/logout.js';
|
|
|
9
9
|
import { server } from './actions/server.js';
|
|
10
10
|
import { getBaseContext, packageJson } from './base.js';
|
|
11
11
|
const __dirname = new URL('.', import.meta.url).pathname;
|
|
12
|
-
const apiUrl = 'https://api.
|
|
12
|
+
const apiUrl = 'https://api.talon.codes';
|
|
13
13
|
// const apiUrl = 'http://localhost:8787'
|
|
14
|
-
const referer = 'https://
|
|
14
|
+
const referer = 'https://talon.codes';
|
|
15
15
|
// const referer = 'http://localhost:3000'
|
|
16
16
|
const appId = 'did:key:z6MkheUYC6euEMuZjL84CixXgRmPfciuYXhz51D85WT3fC5T';
|
|
17
17
|
// const appId = ''
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-feathersdev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "The feathers.dev CLI",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Feathers Cloud Inc.",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"homepage": "https://feathers.dev",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git://github.com/feathersdev/
|
|
16
|
+
"url": "git://github.com/feathersdev/monorepo.git",
|
|
17
17
|
"directory": "packages/cli"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/feathersdev/
|
|
23
|
+
"url": "https://github.com/feathersdev/monorepo/issues"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"featherscloud"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"node": ">= 18"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"prepublish": "pnpm
|
|
46
|
-
"
|
|
47
|
-
"
|
|
45
|
+
"prepublish": "pnpm build",
|
|
46
|
+
"build": "shx rm -rf esm/ && tsc --outDir esm/ --declaration false && shx echo '{ \"type\": \"module\" }' > esm/package.json",
|
|
47
|
+
"test": "vitest --run"
|
|
48
48
|
},
|
|
49
49
|
"directories": {
|
|
50
50
|
"lib": "lib"
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@featherscloud/pinion": "^0.5.5",
|
|
54
54
|
"chalk": "^5.6.2",
|
|
55
|
-
"talon-auth": "^0.
|
|
55
|
+
"talon-auth": "^0.13.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@cloudflare/workers-types": "^4.
|
|
59
|
-
"@types/node": "^
|
|
60
|
-
"api": "workspace:*",
|
|
58
|
+
"@cloudflare/workers-types": "^4.20260219.0",
|
|
59
|
+
"@types/node": "^25.3.0",
|
|
60
|
+
"api.talon.codes": "workspace:*",
|
|
61
61
|
"shx": "^0.4.0",
|
|
62
62
|
"typescript": "^5.9.3"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "05917231b2ce1b808f6955cf082ef8588252ecf3"
|
|
65
65
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createClient } from '@feathersdev/auth'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is your public application id
|
|
5
|
-
*/
|
|
6
|
-
export const appId = '<your-app-id>'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The Feathers auth client instance. You can use it to get a token,
|
|
10
|
-
* retrieve the current user and to log in and out.
|
|
11
|
-
*/
|
|
12
|
-
export const auth = createClient({
|
|
13
|
-
appId,
|
|
14
|
-
onLoginRequired: async (error) => {
|
|
15
|
-
// Redirect to login page if a login is required
|
|
16
|
-
// You can also do other things here like show a modal before redirecting
|
|
17
|
-
window.location.href = await auth.getLoginUrl(error)
|
|
18
|
-
},
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Make an authenticated request to a server using the standard fetch API.
|
|
23
|
-
* Will redirect to the login page instead if the user needs to log in.
|
|
24
|
-
*
|
|
25
|
-
* @param url The URL for the request
|
|
26
|
-
* @param options Additional request options.
|
|
27
|
-
* @returns The fetch response
|
|
28
|
-
*/
|
|
29
|
-
export async function authFetch(url: string, options?: RequestInit) {
|
|
30
|
-
const headers = new Headers(options?.headers)
|
|
31
|
-
|
|
32
|
-
// Set the authorization header with the Feathers Auth token
|
|
33
|
-
headers.set('Authorization', await auth.getHeader())
|
|
34
|
-
|
|
35
|
-
return fetch(url, {
|
|
36
|
-
...options,
|
|
37
|
-
headers,
|
|
38
|
-
})
|
|
39
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: { browser: true, es2020: true },
|
|
4
|
-
extends: [
|
|
5
|
-
'eslint:recommended',
|
|
6
|
-
'plugin:@typescript-eslint/recommended',
|
|
7
|
-
'plugin:react-hooks/recommended',
|
|
8
|
-
],
|
|
9
|
-
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
10
|
-
parser: '@typescript-eslint/parser',
|
|
11
|
-
plugins: ['react-refresh'],
|
|
12
|
-
rules: {
|
|
13
|
-
'react-refresh/only-export-components': [
|
|
14
|
-
'warn',
|
|
15
|
-
{ allowConstantExport: true },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
-
|
|
14
|
-
- Configure the top-level `parserOptions` property like this:
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
export default {
|
|
18
|
-
// other rules...
|
|
19
|
-
parserOptions: {
|
|
20
|
-
ecmaVersion: 'latest',
|
|
21
|
-
sourceType: 'module',
|
|
22
|
-
project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
|
|
23
|
-
tsconfigRootDir: __dirname,
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
29
|
-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
30
|
-
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + React + TS</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="root"></div>
|
|
11
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "feathersdev-react",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"private": true,
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite --port 4040",
|
|
8
|
-
"build": "tsc -b && vite build",
|
|
9
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@feathersdev/auth": "^0.11.0",
|
|
14
|
-
"@feathersdev/automerge": "^0.11.0",
|
|
15
|
-
"react": "^18.3.1",
|
|
16
|
-
"react-dom": "^18.3.1"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"vite-plugin-wasm": "^3.4.1",
|
|
20
|
-
"@types/react": "^18.3.12",
|
|
21
|
-
"@types/react-dom": "^18.3.1",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
|
23
|
-
"@typescript-eslint/parser": "^8.14.0",
|
|
24
|
-
"@vitejs/plugin-react": "^4.3.3",
|
|
25
|
-
"eslint": "^9.14.0",
|
|
26
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
27
|
-
"eslint-plugin-react-refresh": "^0.4.14",
|
|
28
|
-
"typescript": "^5.6.3",
|
|
29
|
-
"vite": "^5.4.11"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|