create-feathersdev 0.11.4 → 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 +42 -83
- package/esm/actions/app.js +3 -3
- package/esm/actions/integrate.js +7 -5
- package/esm/actions/server.js +3 -3
- package/esm/base.js +5 -6
- package/esm/flows/check-login.js +4 -4
- package/esm/flows/with-application.js +8 -9
- package/esm/flows/with-organization.js +4 -4
- package/esm/index.js +3 -3
- package/package.json +13 -15
- 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 -18
- 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 -30
- package/examples/frontend/react/src/App.tsx +0 -33
- package/examples/frontend/react/src/Counter.tsx +0 -29
- package/examples/frontend/react/src/assets/feathers.svg +0 -24
- package/examples/frontend/react/src/auth.ts +0 -39
- package/examples/frontend/react/src/automerge.ts +0 -27
- package/examples/frontend/react/src/main.tsx +0 -9
- 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 -18
- 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/Counter.svelte +0 -33
- package/examples/frontend/svelte/src/app.css +0 -30
- package/examples/frontend/svelte/src/assets/feathers.svg +0 -24
- package/examples/frontend/svelte/src/auth.ts +0 -39
- package/examples/frontend/svelte/src/automerge.ts +0 -27
- 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 -21
- package/examples/frontend/vanilla/package.json +0 -20
- package/examples/frontend/vanilla/public/feathers.svg +0 -24
- package/examples/frontend/vanilla/src/auth.ts +0 -39
- package/examples/frontend/vanilla/src/automerge.ts +0 -27
- package/examples/frontend/vanilla/src/main.ts +0 -35
- package/examples/frontend/vanilla/src/style.css +0 -30
- 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 -18
- 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 -34
- package/examples/frontend/vue/src/Counter.vue +0 -37
- package/examples/frontend/vue/src/assets/base.css +0 -30
- package/examples/frontend/vue/src/assets/feathers.svg +0 -24
- package/examples/frontend/vue/src/assets/main.css +0 -1
- package/examples/frontend/vue/src/auth.ts +0 -39
- package/examples/frontend/vue/src/automerge.ts +0 -27
- 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,147 +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
|
-
## [0.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* Add --app-id parameter to CLI to skip having to log in ([#293](https://github.com/feathersdev/cloud/issues/293)) ([5188d43](https://github.com/feathersdev/cloud/commit/5188d43817020d24e53670a6570382b0b1bf4057))
|
|
12
|
-
* Some usability tweaks for CLI and app ([#289](https://github.com/feathersdev/cloud/issues/289)) ([3a241ff](https://github.com/feathersdev/cloud/commit/3a241ffa6bf75154d437c8371478df6a5b5c0513))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## [0.11.3](https://github.com/feathersdev/cloud/compare/v0.11.2...v0.11.3) (2025-05-26)
|
|
6
|
+
## [0.13.1](https://github.com/feathersdev/monorepo/compare/v0.13.0...v0.13.1) (2026-02-21)
|
|
19
7
|
|
|
20
8
|
**Note:** Version bump only for package create-feathersdev
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## [0.11.2](https://github.com/feathersdev/cloud/compare/v0.11.1...v0.11.2) (2025-05-26)
|
|
27
|
-
|
|
10
|
+
# [0.13.0](https://github.com/feathersdev/monorepo/compare/v0.12.0...v0.13.0) (2026-02-21)
|
|
28
11
|
|
|
29
12
|
### Bug Fixes
|
|
30
13
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
## [0.11.1](https://github.com/feathersdev/cloud/compare/v0.11.0...v0.11.1) (2025-05-25)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### Bug Fixes
|
|
41
|
-
|
|
42
|
-
* Update default development port ([#280](https://github.com/feathersdev/cloud/issues/280)) ([bfcbefa](https://github.com/feathersdev/cloud/commit/bfcbefaffe32bb7b1054540699519fc0d5f8dd33))
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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))
|
|
46
16
|
|
|
17
|
+
### Features
|
|
47
18
|
|
|
48
|
-
|
|
19
|
+
- **talon-auth:** Move to Lit web component ([#360](https://github.com/feathersdev/monorepo/issues/360)) ([d571981](https://github.com/feathersdev/monorepo/commit/d5719815fc6c2c8d137db1fef90a5ce96125ec3b))
|
|
49
20
|
|
|
21
|
+
# [0.12.0](https://github.com/feathersdev/monorepo/compare/v0.11.4...v0.12.0) (2025-11-04)
|
|
50
22
|
|
|
51
23
|
### Features
|
|
52
24
|
|
|
53
|
-
|
|
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))
|
|
54
28
|
|
|
29
|
+
## [0.11.4](https://github.com/feathersdev/monorepo/compare/v0.11.3...v0.11.4) (2025-05-28)
|
|
55
30
|
|
|
31
|
+
### Bug Fixes
|
|
56
32
|
|
|
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))
|
|
57
35
|
|
|
36
|
+
## [0.11.3](https://github.com/feathersdev/monorepo/compare/v0.11.2...v0.11.3) (2025-05-26)
|
|
58
37
|
|
|
59
|
-
|
|
38
|
+
**Note:** Version bump only for package create-feathersdev
|
|
60
39
|
|
|
40
|
+
## [0.11.2](https://github.com/feathersdev/monorepo/compare/v0.11.1...v0.11.2) (2025-05-26)
|
|
61
41
|
|
|
62
42
|
### Bug Fixes
|
|
63
43
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
- Change create-feathersdev to republish examples ([37b2092](https://github.com/feathersdev/monorepo/commit/37b209233b6645e9536b58c1c205d25a32c3605a))
|
|
67
45
|
|
|
46
|
+
## [0.11.1](https://github.com/feathersdev/monorepo/compare/v0.11.0...v0.11.1) (2025-05-25)
|
|
68
47
|
|
|
48
|
+
### Bug Fixes
|
|
69
49
|
|
|
70
|
-
|
|
50
|
+
- Update default development port ([#280](https://github.com/feathersdev/monorepo/issues/280)) ([bfcbefa](https://github.com/feathersdev/monorepo/commit/bfcbefaffe32bb7b1054540699519fc0d5f8dd33))
|
|
71
51
|
|
|
52
|
+
# [0.11.0](https://github.com/feathersdev/monorepo/compare/v0.10.1...v0.11.0) (2025-05-25)
|
|
72
53
|
|
|
73
54
|
### Features
|
|
74
55
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## [0.9.1](https://github.com/feathersdev/cloud/compare/v0.9.0...v0.9.1) (2025-05-15)
|
|
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))
|
|
82
57
|
|
|
58
|
+
## [0.10.1](https://github.com/feathersdev/monorepo/compare/v0.10.0...v0.10.1) (2025-05-16)
|
|
83
59
|
|
|
84
60
|
### Bug Fixes
|
|
85
61
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
# [0.9.0](https://github.com/feathersdev/cloud/compare/v0.8.0...v0.9.0) (2025-05-15)
|
|
62
|
+
- **cli:** Fix feathersdev/auth package reference ([#274](https://github.com/feathersdev/monorepo/issues/274)) ([2a0d199](https://github.com/feathersdev/monorepo/commit/2a0d199fbb9d4ab9408535f6844bcce0c9ae9563))
|
|
93
63
|
|
|
64
|
+
# [0.10.0](https://github.com/feathersdev/monorepo/compare/v0.9.1...v0.10.0) (2025-05-16)
|
|
94
65
|
|
|
95
66
|
### Features
|
|
96
67
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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))
|
|
100
69
|
|
|
70
|
+
## [0.9.1](https://github.com/feathersdev/monorepo/compare/v0.9.0...v0.9.1) (2025-05-15)
|
|
101
71
|
|
|
72
|
+
### Bug Fixes
|
|
102
73
|
|
|
103
|
-
|
|
74
|
+
- Move to feathersdev/cli ([#272](https://github.com/feathersdev/monorepo/issues/272)) ([7062262](https://github.com/feathersdev/monorepo/commit/706226263db7b7f80f07200793559cf3e1988796))
|
|
104
75
|
|
|
76
|
+
# [0.9.0](https://github.com/feathersdev/monorepo/compare/v0.8.0...v0.9.0) (2025-05-15)
|
|
105
77
|
|
|
106
78
|
### Features
|
|
107
79
|
|
|
108
|
-
|
|
109
|
-
|
|
80
|
+
- Update to feathers.dev branding ([#270](https://github.com/feathersdev/monorepo/issues/270)) ([475f925](https://github.com/feathersdev/monorepo/commit/475f925fafe0072d8cdbe33009b5edee96f5a2de))
|
|
110
81
|
|
|
82
|
+
# [0.8.0](https://github.com/feathersdev/monorepo/compare/v0.7.3...v0.8.0) (2025-04-26)
|
|
111
83
|
|
|
84
|
+
### Features
|
|
112
85
|
|
|
86
|
+
- Refactor verification methods into services ([#268](https://github.com/feathersdev/monorepo/issues/268)) ([28d05d0](https://github.com/feathersdev/monorepo/commit/28d05d02e6e596652c5b32b1273768a43f343223))
|
|
113
87
|
|
|
114
|
-
## [0.7.3](https://github.com/feathersdev/
|
|
88
|
+
## [0.7.3](https://github.com/feathersdev/monorepo/compare/v0.7.2...v0.7.3) (2024-12-20)
|
|
115
89
|
|
|
116
90
|
**Note:** Version bump only for package @featherscloud/cli
|
|
117
91
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
## [0.7.2](https://github.com/feathersdev/cloud/compare/v0.7.1...v0.7.2) (2024-12-16)
|
|
123
|
-
|
|
92
|
+
## [0.7.2](https://github.com/feathersdev/monorepo/compare/v0.7.1...v0.7.2) (2024-12-16)
|
|
124
93
|
|
|
125
94
|
### Bug Fixes
|
|
126
95
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
## [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))
|
|
134
97
|
|
|
98
|
+
## [0.7.1](https://github.com/feathersdev/monorepo/compare/v0.7.0...v0.7.1) (2024-12-12)
|
|
135
99
|
|
|
136
100
|
### Bug Fixes
|
|
137
101
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
# [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))
|
|
145
103
|
|
|
104
|
+
# [0.7.0](https://github.com/feathersdev/monorepo/compare/v0.6.5...v0.7.0) (2024-12-12)
|
|
146
105
|
|
|
147
106
|
### Features
|
|
148
107
|
|
|
149
|
-
|
|
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,12 +60,14 @@ 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. 🚀
|
|
68
|
-
Make sure to install the ${chalk.gray('
|
|
70
|
+
Make sure to install the ${chalk.gray('talon-auth')} package using your your package manager.
|
|
69
71
|
Have a look at the generated files for more information on how to use them.
|
|
70
72
|
|
|
71
73
|
Go to ${chalk.blue.underline('https://app.feathers.dev')} to customize your login page and manage your users.
|
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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { prompt } from '@featherscloud/pinion';
|
|
2
|
-
import { LoginRequiredError } from '@feathersdev/auth';
|
|
3
2
|
import chalk from 'chalk';
|
|
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,15 +35,14 @@ 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,
|
|
43
42
|
selectedApplication: {
|
|
44
43
|
id: ctx.appId,
|
|
45
44
|
name: '',
|
|
46
|
-
},
|
|
45
|
+
}, // Using app ID directly without fetching full details
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
return withRemoteApplication(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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { Command, commander } from '@featherscloud/pinion';
|
|
4
|
-
import { createFileStore } from '
|
|
4
|
+
import { createFileStore } from 'talon-auth';
|
|
5
5
|
import { app } from './actions/app.js';
|
|
6
6
|
import { integrate } from './actions/integrate.js';
|
|
7
7
|
import { login } from './actions/login.js';
|
|
@@ -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,26 +42,24 @@
|
|
|
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"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@featherscloud/pinion": "^0.5.5",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"@feathersjs/rest-client": "^5.0.33",
|
|
57
|
-
"chalk": "^5.4.1"
|
|
54
|
+
"chalk": "^5.6.2",
|
|
55
|
+
"talon-auth": "^0.13.1"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
60
|
-
"@cloudflare/workers-types": "^4.
|
|
61
|
-
"@types/node": "^
|
|
62
|
-
"api": "workspace
|
|
58
|
+
"@cloudflare/workers-types": "^4.20260219.0",
|
|
59
|
+
"@types/node": "^25.3.0",
|
|
60
|
+
"api.talon.codes": "workspace:*",
|
|
63
61
|
"shx": "^0.4.0",
|
|
64
|
-
"typescript": "^5.
|
|
62
|
+
"typescript": "^5.9.3"
|
|
65
63
|
},
|
|
66
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "05917231b2ce1b808f6955cf082ef8588252ecf3"
|
|
67
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,18 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8" />
|
|
6
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
-
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
|
|
9
|
-
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
|
10
|
-
<title>feathers.dev React App</title>
|
|
11
|
-
</head>
|
|
12
|
-
|
|
13
|
-
<body>
|
|
14
|
-
<div id="root"></div>
|
|
15
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
16
|
-
</body>
|
|
17
|
-
|
|
18
|
-
</html>
|