create-foldkit-app 0.15.1 → 0.15.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.
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { NodeRuntime, NodeServices, NodeStdio } from '@effect/platform-node';
|
|
3
2
|
import { Effect, Layer, Option, Schema } from 'effect';
|
|
4
3
|
import { Command, Flag } from 'effect/unstable/cli';
|
|
5
4
|
import { FetchHttpClient } from 'effect/unstable/http';
|
|
6
5
|
import { createRequire } from 'node:module';
|
|
6
|
+
import { NodeRuntime, NodeServices, NodeStdio } from '@effect/platform-node';
|
|
7
7
|
import { create as create_ } from './commands/create.js';
|
|
8
8
|
import { EXAMPLE_VALUES } from './examples.js';
|
|
9
9
|
import { validateProjectName } from './validateName.js';
|
package/dist/utils/packages.js
CHANGED
|
@@ -9,7 +9,15 @@ const PackageJson = Schema.Struct({
|
|
|
9
9
|
dependencies: StringRecord.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
10
10
|
devDependencies: StringRecord.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
11
11
|
});
|
|
12
|
-
|
|
12
|
+
// NOTE: foldkit workspace packages an example may depend on that aren't
|
|
13
|
+
// already installed at `latest` by the hardcoded commands below. They ship
|
|
14
|
+
// from the same monorepo, so pin them to `latest` like `foldkit` itself.
|
|
15
|
+
const PASS_THROUGH_WORKSPACE_PACKAGES = new Set([
|
|
16
|
+
'@foldkit/ui',
|
|
17
|
+
'@foldkit/devtools',
|
|
18
|
+
]);
|
|
19
|
+
const formatDeps = (deps) => pipe(deps, Record.toEntries, Array.filter(([name, version]) => !version.includes('workspace:') ||
|
|
20
|
+
PASS_THROUGH_WORKSPACE_PACKAGES.has(name)), Array.map(([name, version]) => version.includes('workspace:') ? `${name}@latest` : `${name}@${version}`));
|
|
13
21
|
const fetchExampleDeps = (example) => Effect.gen(function* () {
|
|
14
22
|
const client = yield* HttpClient.HttpClient;
|
|
15
23
|
const url = `${GITHUB_RAW_BASE_URL}/${example}/package.json`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
|
|
1
3
|
import { foldkit } from '@foldkit/vite-plugin'
|
|
2
4
|
import tailwindcss from '@tailwindcss/vite'
|
|
3
|
-
import { defineConfig } from 'vite'
|
|
4
5
|
|
|
5
6
|
export default defineConfig({
|
|
6
7
|
plugins: [tailwindcss(), foldkit({ devToolsMcpPort: 9988 })],
|