@soroush.design/cli 0.2.0-alpha.3 → 0.2.0-alpha.5
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/bin.mjs +2 -15
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/{io-Bybgct-f.mjs → io-CqI2BTaP.mjs} +430 -1032
- package/package.json +14 -5
- package/templates/astro/js/base/README.md +93 -0
- package/templates/astro/js/base/_gitignore +5 -0
- package/templates/astro/js/base/astro.config.mjs +23 -0
- package/templates/astro/js/base/src/components/About.jsx +24 -0
- package/templates/astro/js/base/src/components/Counter.jsx +26 -0
- package/templates/astro/js/base/src/components/Greeting.jsx +60 -0
- package/templates/astro/js/base/src/components/Header.jsx +99 -0
- package/templates/astro/js/base/src/components/Home.jsx +32 -0
- package/templates/astro/js/base/src/components/Home.test.jsx +39 -0
- package/templates/astro/js/base/src/components/NotFound.jsx +17 -0
- package/templates/astro/js/base/src/data/api.js +84 -0
- package/templates/astro/js/base/src/layouts/Layout.astro +52 -0
- package/templates/astro/js/base/src/pages/404.astro +12 -0
- package/templates/astro/js/base/src/pages/about.astro +12 -0
- package/templates/astro/js/base/src/pages/index.astro +23 -0
- package/templates/astro/js/base/src/theme/Island.jsx +89 -0
- package/templates/astro/js/base/src/theme/scheme.js +32 -0
- package/templates/astro/js/base/vitest.config.js +12 -0
- package/templates/astro/js/sample-data/src/components/ItemDetails.jsx +64 -0
- package/templates/astro/js/sample-data/src/components/ItemList.jsx +100 -0
- package/templates/astro/js/sample-data/src/components/StatusChip.jsx +8 -0
- package/templates/astro/js/sample-data/src/data/items.js +65 -0
- package/templates/astro/js/sample-data/src/pages/items/[id].astro +37 -0
- package/templates/astro/js/sample-data/src/pages/items/index.astro +20 -0
- package/templates/astro/js/with/jotai/src/components/Counter.jsx +26 -0
- package/templates/astro/js/with/jotai/src/state/counter.js +4 -0
- package/templates/astro/js/with/msw/_env +3 -0
- package/templates/astro/js/with/msw/src/mocks/browser.js +5 -0
- package/templates/astro/js/with/msw/src/mocks/handlers.js +24 -0
- package/templates/astro/js/with/msw/src/mocks/server.js +5 -0
- package/templates/astro/js/with/msw/src/mocks/setupTests.js +7 -0
- package/templates/astro/js/with/msw/src/mocks/start.js +14 -0
- package/templates/astro/js/with/react-hook-form/src/components/Form.jsx +313 -0
- package/templates/astro/js/with/react-hook-form/src/pages/form.astro +8 -0
- package/templates/astro/js/with/redux-toolkit/src/components/Counter.jsx +27 -0
- package/templates/astro/js/with/redux-toolkit/src/state/store.js +18 -0
- package/templates/astro/js/with/tanstack-query/src/data/queryClient.js +13 -0
- package/templates/astro/js/with/zustand/src/components/Counter.jsx +24 -0
- package/templates/astro/js/with/zustand/src/state/counter.js +14 -0
- package/templates/astro/ts/base/README.md +93 -0
- package/templates/astro/ts/base/_gitignore +5 -0
- package/templates/astro/ts/base/astro.config.mjs +23 -0
- package/templates/astro/ts/base/src/components/About.tsx +24 -0
- package/templates/astro/ts/base/src/components/Counter.tsx +26 -0
- package/templates/astro/ts/base/src/components/Greeting.tsx +61 -0
- package/templates/astro/ts/base/src/components/Header.tsx +99 -0
- package/templates/astro/ts/base/src/components/Home.test.tsx +39 -0
- package/templates/astro/ts/base/src/components/Home.tsx +33 -0
- package/templates/astro/ts/base/src/components/NotFound.tsx +17 -0
- package/templates/astro/ts/base/src/data/api.ts +92 -0
- package/templates/astro/ts/base/src/layouts/Layout.astro +52 -0
- package/templates/astro/ts/base/src/pages/404.astro +12 -0
- package/templates/astro/ts/base/src/pages/about.astro +12 -0
- package/templates/astro/ts/base/src/pages/index.astro +23 -0
- package/templates/astro/ts/base/src/theme/Island.tsx +90 -0
- package/templates/astro/ts/base/src/theme/scheme.ts +34 -0
- package/templates/astro/ts/base/tsconfig.json +9 -0
- package/templates/astro/ts/base/vitest.config.ts +12 -0
- package/templates/astro/ts/sample-data/src/components/ItemDetails.tsx +65 -0
- package/templates/astro/ts/sample-data/src/components/ItemList.tsx +109 -0
- package/templates/astro/ts/sample-data/src/components/StatusChip.tsx +9 -0
- package/templates/astro/ts/sample-data/src/data/items.ts +71 -0
- package/templates/astro/ts/sample-data/src/pages/items/[id].astro +39 -0
- package/templates/astro/ts/sample-data/src/pages/items/index.astro +20 -0
- package/templates/astro/ts/with/jotai/src/components/Counter.tsx +26 -0
- package/templates/astro/ts/with/jotai/src/state/counter.ts +4 -0
- package/templates/astro/ts/with/msw/_env +3 -0
- package/templates/astro/ts/with/msw/src/mocks/browser.ts +5 -0
- package/templates/astro/ts/with/msw/src/mocks/handlers.ts +24 -0
- package/templates/astro/ts/with/msw/src/mocks/server.ts +5 -0
- package/templates/astro/ts/with/msw/src/mocks/setupTests.ts +7 -0
- package/templates/astro/ts/with/msw/src/mocks/start.ts +14 -0
- package/templates/astro/ts/with/react-hook-form/src/components/Form.tsx +317 -0
- package/templates/astro/ts/with/react-hook-form/src/pages/form.astro +8 -0
- package/templates/astro/ts/with/redux-toolkit/src/components/Counter.tsx +27 -0
- package/templates/astro/ts/with/redux-toolkit/src/state/store.ts +19 -0
- package/templates/astro/ts/with/tanstack-query/src/data/queryClient.ts +13 -0
- package/templates/astro/ts/with/zustand/src/components/Counter.tsx +24 -0
- package/templates/astro/ts/with/zustand/src/state/counter.ts +19 -0
- package/templates/react-router/js/base/README.md +67 -0
- package/templates/react-router/js/base/_gitignore +4 -0
- package/templates/react-router/js/base/index.html +12 -0
- package/templates/react-router/js/base/src/components/RouterLink.jsx +12 -0
- package/templates/react-router/js/base/src/data/api.js +76 -0
- package/templates/react-router/js/base/src/main.jsx +38 -0
- package/templates/react-router/js/base/src/pages/ErrorPage.jsx +14 -0
- package/templates/react-router/js/base/src/pages/Layout.jsx +141 -0
- package/templates/react-router/js/base/src/pages/about/Page.jsx +14 -0
- package/templates/react-router/js/base/src/pages/index/Counter.jsx +18 -0
- package/templates/react-router/js/base/src/pages/index/Greeting.jsx +48 -0
- package/templates/react-router/js/base/src/pages/index/Page.jsx +29 -0
- package/templates/react-router/js/base/src/pages/index/Page.test.jsx +61 -0
- package/templates/react-router/js/base/src/routes.jsx +46 -0
- package/templates/react-router/js/base/vite.config.js +13 -0
- package/templates/react-router/js/base/vitest.config.js +13 -0
- package/templates/react-router/js/sample-data/src/data/items.js +55 -0
- package/templates/react-router/js/sample-data/src/pages/item/Page.jsx +49 -0
- package/templates/react-router/js/sample-data/src/pages/item/loader.js +14 -0
- package/templates/react-router/js/sample-data/src/pages/items/Page.jsx +48 -0
- package/templates/react-router/js/sample-data/src/pages/items/StatusChip.jsx +8 -0
- package/templates/react-router/js/sample-data/src/pages/items/loader.js +11 -0
- package/templates/react-router/js/with/jotai/src/pages/index/Counter.jsx +19 -0
- package/templates/react-router/js/with/jotai/src/state/counter.js +4 -0
- package/templates/react-router/js/with/jotai/src/state/scheme.js +4 -0
- package/templates/react-router/js/with/msw/_env +3 -0
- package/templates/react-router/js/with/msw/src/mocks/browser.js +5 -0
- package/templates/react-router/js/with/msw/src/mocks/handlers.js +24 -0
- package/templates/react-router/js/with/msw/src/mocks/server.js +5 -0
- package/templates/react-router/js/with/msw/src/mocks/setupTests.js +7 -0
- package/templates/react-router/js/with/msw/src/mocks/start.js +10 -0
- package/templates/react-router/js/with/react-hook-form/src/pages/form/Page.jsx +294 -0
- package/templates/react-router/js/with/redux-toolkit/src/pages/index/Counter.jsx +20 -0
- package/templates/react-router/js/with/redux-toolkit/src/state/store.js +27 -0
- package/templates/react-router/js/with/zustand/src/pages/index/Counter.jsx +17 -0
- package/templates/react-router/js/with/zustand/src/state/counter.js +14 -0
- package/templates/react-router/js/with/zustand/src/state/scheme.js +14 -0
- package/templates/react-router/ts/base/README.md +67 -0
- package/templates/react-router/ts/base/_gitignore +4 -0
- package/templates/react-router/ts/base/index.html +12 -0
- package/templates/react-router/ts/base/src/components/RouterLink.tsx +12 -0
- package/templates/react-router/ts/base/src/data/api.ts +84 -0
- package/templates/react-router/ts/base/src/main.tsx +38 -0
- package/templates/react-router/ts/base/src/pages/ErrorPage.tsx +14 -0
- package/templates/react-router/ts/base/src/pages/Layout.tsx +141 -0
- package/templates/react-router/ts/base/src/pages/about/Page.tsx +14 -0
- package/templates/react-router/ts/base/src/pages/index/Counter.tsx +18 -0
- package/templates/react-router/ts/base/src/pages/index/Greeting.tsx +49 -0
- package/templates/react-router/ts/base/src/pages/index/Page.test.tsx +61 -0
- package/templates/react-router/ts/base/src/pages/index/Page.tsx +29 -0
- package/templates/react-router/ts/base/src/routes.tsx +47 -0
- package/templates/react-router/ts/base/tsconfig.json +18 -0
- package/templates/react-router/ts/base/vite.config.ts +13 -0
- package/templates/react-router/ts/base/vitest.config.ts +13 -0
- package/templates/react-router/ts/sample-data/src/data/items.ts +61 -0
- package/templates/react-router/ts/sample-data/src/pages/item/Page.tsx +50 -0
- package/templates/react-router/ts/sample-data/src/pages/item/loader.ts +14 -0
- package/templates/react-router/ts/sample-data/src/pages/items/Page.tsx +49 -0
- package/templates/react-router/ts/sample-data/src/pages/items/StatusChip.tsx +9 -0
- package/templates/react-router/ts/sample-data/src/pages/items/loader.ts +11 -0
- package/templates/react-router/ts/with/jotai/src/pages/index/Counter.tsx +19 -0
- package/templates/react-router/ts/with/jotai/src/state/counter.ts +4 -0
- package/templates/react-router/ts/with/jotai/src/state/scheme.ts +4 -0
- package/templates/react-router/ts/with/msw/_env +3 -0
- package/templates/react-router/ts/with/msw/src/mocks/browser.ts +5 -0
- package/templates/react-router/ts/with/msw/src/mocks/handlers.ts +24 -0
- package/templates/react-router/ts/with/msw/src/mocks/server.ts +5 -0
- package/templates/react-router/ts/with/msw/src/mocks/setupTests.ts +7 -0
- package/templates/react-router/ts/with/msw/src/mocks/start.ts +10 -0
- package/templates/react-router/ts/with/react-hook-form/src/pages/form/Page.tsx +298 -0
- package/templates/react-router/ts/with/redux-toolkit/src/pages/index/Counter.tsx +20 -0
- package/templates/react-router/ts/with/redux-toolkit/src/state/store.ts +29 -0
- package/templates/react-router/ts/with/zustand/src/pages/index/Counter.tsx +17 -0
- package/templates/react-router/ts/with/zustand/src/state/counter.ts +19 -0
- package/templates/react-router/ts/with/zustand/src/state/scheme.ts +19 -0
- package/templates/templates.md +67 -0
- package/templates/vike/js/base/README.md +83 -0
- package/templates/vike/js/base/_gitignore +4 -0
- package/templates/vike/js/base/src/data/api.js +76 -0
- package/templates/vike/js/base/src/pages/+Layout.jsx +183 -0
- package/templates/vike/js/base/src/pages/+config.js +12 -0
- package/templates/vike/js/base/src/pages/+onRenderClient.jsx +39 -0
- package/templates/vike/js/base/src/pages/+onRenderHtml.jsx +27 -0
- package/templates/vike/js/base/src/pages/PageShell.jsx +47 -0
- package/templates/vike/js/base/src/pages/_error/+Page.jsx +14 -0
- package/templates/vike/js/base/src/pages/about/+Page.jsx +14 -0
- package/templates/vike/js/base/src/pages/index/+Page.jsx +33 -0
- package/templates/vike/js/base/src/pages/index/Counter.jsx +20 -0
- package/templates/vike/js/base/src/pages/index/Greeting.jsx +48 -0
- package/templates/vike/js/base/src/pages/index/Page.test.jsx +67 -0
- package/templates/vike/js/base/src/pages/usePageContext.jsx +20 -0
- package/templates/vike/js/base/vite.config.js +14 -0
- package/templates/vike/js/base/vitest.config.js +13 -0
- package/templates/vike/js/sample-data/src/data/items.js +58 -0
- package/templates/vike/js/sample-data/src/pages/items/+Page.jsx +49 -0
- package/templates/vike/js/sample-data/src/pages/items/+data.js +26 -0
- package/templates/vike/js/sample-data/src/pages/items/@id/+Page.jsx +40 -0
- package/templates/vike/js/sample-data/src/pages/items/@id/+data.js +33 -0
- package/templates/vike/js/sample-data/src/pages/items/@id/+onBeforePrerenderStart.js +8 -0
- package/templates/vike/js/sample-data/src/pages/items/StatusChip.jsx +8 -0
- package/templates/vike/js/ssg/src/pages/+config.js +11 -0
- package/templates/vike/js/ssg/src/pages/about/+Page.jsx +13 -0
- package/templates/vike/js/ssr/src/pages/+config.js +12 -0
- package/templates/vike/js/ssr/src/pages/+onRenderHtml.jsx +27 -0
- package/templates/vike/js/ssr/src/pages/about/+Page.jsx +14 -0
- package/templates/vike/js/with/jotai/src/pages/index/Counter.jsx +19 -0
- package/templates/vike/js/with/jotai/src/state/counter.js +4 -0
- package/templates/vike/js/with/jotai/src/state/scheme.js +4 -0
- package/templates/vike/js/with/msw/_env +3 -0
- package/templates/vike/js/with/msw/src/mocks/browser.js +5 -0
- package/templates/vike/js/with/msw/src/mocks/handlers.js +24 -0
- package/templates/vike/js/with/msw/src/mocks/server.js +5 -0
- package/templates/vike/js/with/msw/src/mocks/setupTests.js +7 -0
- package/templates/vike/js/with/msw/src/mocks/start.js +10 -0
- package/templates/vike/js/with/react-hook-form/src/pages/form/+Page.jsx +294 -0
- package/templates/vike/js/with/redux-toolkit/src/pages/index/Counter.jsx +20 -0
- package/templates/vike/js/with/redux-toolkit/src/state/store.js +27 -0
- package/templates/vike/js/with/zustand/src/pages/index/Counter.jsx +17 -0
- package/templates/vike/js/with/zustand/src/state/counter.js +14 -0
- package/templates/vike/js/with/zustand/src/state/scheme.js +14 -0
- package/templates/vike/ts/base/README.md +83 -0
- package/templates/vike/ts/base/_gitignore +4 -0
- package/templates/vike/ts/base/src/data/api.ts +84 -0
- package/templates/vike/ts/base/src/pages/+Layout.tsx +184 -0
- package/templates/vike/ts/base/src/pages/+config.ts +14 -0
- package/templates/vike/ts/base/src/pages/+onRenderClient.tsx +41 -0
- package/templates/vike/ts/base/src/pages/+onRenderHtml.tsx +28 -0
- package/templates/vike/ts/base/src/pages/PageShell.tsx +48 -0
- package/templates/vike/ts/base/src/pages/_error/+Page.tsx +14 -0
- package/templates/vike/ts/base/src/pages/about/+Page.tsx +14 -0
- package/templates/vike/ts/base/src/pages/index/+Page.tsx +33 -0
- package/templates/vike/ts/base/src/pages/index/Counter.tsx +20 -0
- package/templates/vike/ts/base/src/pages/index/Greeting.tsx +49 -0
- package/templates/vike/ts/base/src/pages/index/Page.test.tsx +67 -0
- package/templates/vike/ts/base/src/pages/usePageContext.tsx +27 -0
- package/templates/vike/ts/base/src/vike.d.ts +20 -0
- package/templates/vike/ts/base/tsconfig.json +18 -0
- package/templates/vike/ts/base/vite.config.ts +14 -0
- package/templates/vike/ts/base/vitest.config.ts +13 -0
- package/templates/vike/ts/sample-data/src/data/items.ts +64 -0
- package/templates/vike/ts/sample-data/src/pages/items/+Page.tsx +50 -0
- package/templates/vike/ts/sample-data/src/pages/items/+data.ts +28 -0
- package/templates/vike/ts/sample-data/src/pages/items/@id/+Page.tsx +41 -0
- package/templates/vike/ts/sample-data/src/pages/items/@id/+data.ts +37 -0
- package/templates/vike/ts/sample-data/src/pages/items/@id/+onBeforePrerenderStart.ts +8 -0
- package/templates/vike/ts/sample-data/src/pages/items/StatusChip.tsx +9 -0
- package/templates/vike/ts/ssg/src/pages/+config.ts +13 -0
- package/templates/vike/ts/ssg/src/pages/about/+Page.tsx +13 -0
- package/templates/vike/ts/ssr/src/pages/+config.ts +14 -0
- package/templates/vike/ts/ssr/src/pages/+onRenderHtml.tsx +28 -0
- package/templates/vike/ts/ssr/src/pages/about/+Page.tsx +14 -0
- package/templates/vike/ts/with/jotai/src/pages/index/Counter.tsx +19 -0
- package/templates/vike/ts/with/jotai/src/state/counter.ts +4 -0
- package/templates/vike/ts/with/jotai/src/state/scheme.ts +4 -0
- package/templates/vike/ts/with/msw/_env +3 -0
- package/templates/vike/ts/with/msw/src/mocks/browser.ts +5 -0
- package/templates/vike/ts/with/msw/src/mocks/handlers.ts +24 -0
- package/templates/vike/ts/with/msw/src/mocks/server.ts +5 -0
- package/templates/vike/ts/with/msw/src/mocks/setupTests.ts +7 -0
- package/templates/vike/ts/with/msw/src/mocks/start.ts +10 -0
- package/templates/vike/ts/with/react-hook-form/src/pages/form/+Page.tsx +298 -0
- package/templates/vike/ts/with/redux-toolkit/src/pages/index/Counter.tsx +20 -0
- package/templates/vike/ts/with/redux-toolkit/src/state/store.ts +29 -0
- package/templates/vike/ts/with/zustand/src/pages/index/Counter.tsx +17 -0
- package/templates/vike/ts/with/zustand/src/state/counter.ts +19 -0
- package/templates/vike/ts/with/zustand/src/state/scheme.ts +19 -0
package/dist/bin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as main,
|
|
2
|
+
import { n as main, t as createNodeIo } from "./io-CqI2BTaP.mjs";
|
|
3
3
|
// ../design-system/package.json
|
|
4
4
|
var name = "@soroush.tech/design-system";
|
|
5
5
|
var version = "2.2.0";
|
|
@@ -7,23 +7,10 @@ var peerDependencies = {
|
|
|
7
7
|
"react": "^18.0.0 || ^19.0.0",
|
|
8
8
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
9
9
|
};
|
|
10
|
-
// src/designSystemVersion.ts
|
|
11
|
-
/**
|
|
12
|
-
* The design system version the cli run on its own installs: the one it was built next to, read
|
|
13
|
-
* from the workspace at build time. That is the target version, which a prerelease cli is
|
|
14
|
-
* published ahead of, so a prerelease cli asks for the design system prerelease of its own
|
|
15
|
-
* channel instead: `2.3.0-alpha.0` from a `0.2.0-alpha.N` cli, which `^` takes to the newest
|
|
16
|
-
* alpha, or to `2.3.0` once it is out.
|
|
17
|
-
*/
|
|
18
|
-
function getDesignSystemVersion(designSystemVersion, cliVersion) {
|
|
19
|
-
const channel = /-([a-z]+)\.\d+$/.exec(cliVersion)?.[1];
|
|
20
|
-
if (!channel || designSystemVersion.includes("-")) return designSystemVersion;
|
|
21
|
-
return `${designSystemVersion}-${channel}.0`;
|
|
22
|
-
}
|
|
23
10
|
// src/bin.ts
|
|
24
11
|
process.exitCode = await main(process.argv.slice(2), createNodeIo(), {
|
|
25
12
|
name,
|
|
26
|
-
version
|
|
13
|
+
version,
|
|
27
14
|
peerDependencies
|
|
28
15
|
});
|
|
29
16
|
export {};
|
package/dist/index.d.mts
CHANGED
|
@@ -75,13 +75,13 @@ export declare function readDesignSystemPackage(fromFile: string): PackageJson;
|
|
|
75
75
|
*/
|
|
76
76
|
declare function main(argv: readonly string[], io: Io, designSystem: PackageJson): Promise<number>;
|
|
77
77
|
/** A library `create` can add to a new app, with its wiring and a small example. */
|
|
78
|
-
type Library = 'tanstack-query' | 'swr' | 'msw' | 'zustand' | 'jotai' | 'redux-toolkit' | 'react-hook-form'
|
|
78
|
+
type Library = 'tanstack-query' | 'swr' | 'msw' | 'zustand' | 'jotai' | 'redux-toolkit' | 'react-hook-form';
|
|
79
79
|
/**
|
|
80
80
|
* How the app's pages are rendered: `isomorphic`, prerendered to HTML at build time and then
|
|
81
|
-
* moving between pages in the browser; `
|
|
82
|
-
* no JavaScript in the browser.
|
|
81
|
+
* moving between pages in the browser; `ssr`, rendered on a server on each request, then the
|
|
82
|
+
* same; `spa`, rendered in the browser only; `ssg`, HTML only, with no JavaScript in the browser.
|
|
83
83
|
*/
|
|
84
|
-
type Rendering = 'isomorphic' | 'spa' | 'ssg';
|
|
84
|
+
type Rendering = 'isomorphic' | 'ssr' | 'spa' | 'ssg';
|
|
85
85
|
/**
|
|
86
86
|
* How the repository holds the app: `workspace`, as `apps/web` of a workspace that has room for
|
|
87
87
|
* more apps and services; `standalone`, the app alone at the root.
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createNodeIo, n as default,
|
|
1
|
+
export { t as createNodeIo, n as default, r as readDesignSystemPackage } from "./io-CqI2BTaP.mjs";
|