@jarwizz/create-jarshop 0.1.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/LICENSE +21 -0
- package/README.md +25 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +14 -0
- package/dist/cli.js.map +1 -0
- package/dist/generator.d.ts +16 -0
- package/dist/generator.js +198 -0
- package/dist/generator.js.map +1 -0
- package/dist/template/AGENTS.md +41 -0
- package/dist/template/CONTEXT.md +37 -0
- package/dist/template/MEMORY.md +16 -0
- package/dist/template/README.md +63 -0
- package/dist/template/docker-compose.yml +14 -0
- package/dist/template/env.example.template +14 -0
- package/dist/template/gitignore.template +10 -0
- package/dist/template/package.json +46 -0
- package/dist/template/pnpm-lock.yaml +12852 -0
- package/dist/template/pnpm-workspace.yaml +24 -0
- package/dist/template/src/dev.ts +154 -0
- package/dist/template/src/environment.d.ts +19 -0
- package/dist/template/src/index-worker.ts +9 -0
- package/dist/template/src/index.ts +7 -0
- package/dist/template/src/migrations/1786024108433-initial.ts +2677 -0
- package/dist/template/src/seed.ts +138 -0
- package/dist/template/src/vendure-config.ts +75 -0
- package/dist/template/static/email/templates/email-address-change/body.hbs +20 -0
- package/dist/template/static/email/templates/email-verification/body.hbs +20 -0
- package/dist/template/static/email/templates/order-confirmation/body.hbs +133 -0
- package/dist/template/static/email/templates/partials/footer.hbs +10 -0
- package/dist/template/static/email/templates/partials/header.hbs +18 -0
- package/dist/template/static/email/templates/password-reset/body.hbs +24 -0
- package/dist/template/storefront/README.md +8 -0
- package/dist/template/storefront/app/[locale]/[slug]/page.tsx +52 -0
- package/dist/template/storefront/app/[locale]/page.tsx +35 -0
- package/dist/template/storefront/app/globals.css +16 -0
- package/dist/template/storefront/eslint.config.mjs +9 -0
- package/dist/template/storefront/lib/commerce.ts +35 -0
- package/dist/template/storefront/next-env.d.ts +6 -0
- package/dist/template/storefront/next.config.ts +14 -0
- package/dist/template/storefront/package.json +32 -0
- package/dist/template/storefront/pnpm-lock.yaml +3562 -0
- package/dist/template/storefront/pnpm-workspace.yaml +26 -0
- package/dist/template/storefront/tsconfig.json +30 -0
- package/dist/template/tsconfig.dashboard.json +4 -0
- package/dist/template/tsconfig.json +15 -0
- package/dist/template/turbo.json +8 -0
- package/dist/template/vite.config.mts +26 -0
- package/dist/template-manifest.json +3 -0
- package/dist/template.d.ts +8 -0
- package/dist/template.js +54 -0
- package/dist/template.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
packages: []
|
|
2
|
+
# The eslint-config-next range otherwise resolves 3.10.1, which pnpm rejects as
|
|
3
|
+
# a trust downgrade. Keep the reviewed compatible resolver exact.
|
|
4
|
+
overrides:
|
|
5
|
+
eslint-import-resolver-typescript: 3.8.7
|
|
6
|
+
minimumReleaseAgeExclude:
|
|
7
|
+
- "@jarwizz/commerce-sdk@0.1.0"
|
|
8
|
+
|
|
9
|
+
allowBuilds:
|
|
10
|
+
esbuild: true
|
|
11
|
+
sharp: true
|
|
12
|
+
protobufjs: false
|
|
13
|
+
strictDepBuilds: true
|
|
14
|
+
dangerouslyAllowAllBuilds: false
|
|
15
|
+
verifyDepsBeforeRun: warn
|
|
16
|
+
savePrefix: ""
|
|
17
|
+
minimumReleaseAge: 1440
|
|
18
|
+
minimumReleaseAgeStrict: true
|
|
19
|
+
minimumReleaseAgeIgnoreMissingTime: false
|
|
20
|
+
trustPolicy: no-downgrade
|
|
21
|
+
# eslint-plugin-react retains this reviewed legacy transitive version. The
|
|
22
|
+
# lockfile still pins its registry integrity and all other trust checks remain on.
|
|
23
|
+
trustPolicyExclude:
|
|
24
|
+
- semver@6.3.1
|
|
25
|
+
trustLockfile: false
|
|
26
|
+
blockExoticSubdeps: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": false,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"next-env.d.ts",
|
|
24
|
+
"**/*.ts",
|
|
25
|
+
"**/*.tsx",
|
|
26
|
+
"dist/types/**/*.ts",
|
|
27
|
+
"dist/dev/types/**/*.ts"
|
|
28
|
+
],
|
|
29
|
+
"exclude": ["node_modules"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"emitDecoratorMetadata": true,
|
|
12
|
+
"useDefineForClassFields": false
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*.ts"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { vendureDashboardPlugin } from "@vendure/dashboard/vite";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import { defineConfig } from "vite";
|
|
5
|
+
|
|
6
|
+
const projectRoot = fileURLToPath(new URL(".", import.meta.url));
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
base: "/dashboard",
|
|
10
|
+
build: { outDir: join(projectRoot, "dist/dashboard") },
|
|
11
|
+
plugins: [
|
|
12
|
+
vendureDashboardPlugin({
|
|
13
|
+
vendureConfigPath: pathToFileURL(
|
|
14
|
+
resolve(projectRoot, "src/vendure-config.ts"),
|
|
15
|
+
),
|
|
16
|
+
api:
|
|
17
|
+
process.env.NODE_ENV === "production"
|
|
18
|
+
? { host: "auto", port: "auto" }
|
|
19
|
+
: { host: "http://localhost", port: 3000 },
|
|
20
|
+
gqlOutputPath: "./src/gql",
|
|
21
|
+
}),
|
|
22
|
+
],
|
|
23
|
+
resolve: {
|
|
24
|
+
alias: { "@/gql": resolve(projectRoot, "src/gql/graphql.ts") },
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function shouldIncludeTemplatePath(path: string): boolean;
|
|
2
|
+
export interface TemplateFile {
|
|
3
|
+
readonly content: Buffer;
|
|
4
|
+
readonly path: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function readTemplateFiles(root: string): Promise<TemplateFile[]>;
|
|
7
|
+
export declare function sha256(content: Buffer | string): string;
|
|
8
|
+
export declare function sha256Tree(root: string): Promise<string>;
|
package/dist/template.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
const ignoredNames = new Set([
|
|
5
|
+
".env",
|
|
6
|
+
".next",
|
|
7
|
+
".turbo",
|
|
8
|
+
".vendure",
|
|
9
|
+
"dist",
|
|
10
|
+
"node_modules",
|
|
11
|
+
]);
|
|
12
|
+
export function shouldIncludeTemplatePath(path) {
|
|
13
|
+
return !path
|
|
14
|
+
.split(/[\\/]/u)
|
|
15
|
+
.some((segment) => ignoredNames.has(segment) || segment.endsWith(".tsbuildinfo"));
|
|
16
|
+
}
|
|
17
|
+
export async function readTemplateFiles(root) {
|
|
18
|
+
const files = [];
|
|
19
|
+
async function walk(current, prefix) {
|
|
20
|
+
const entries = await readdir(current, { withFileTypes: true });
|
|
21
|
+
entries.sort((left, right) => left.name.localeCompare(right.name));
|
|
22
|
+
for (const entry of entries) {
|
|
23
|
+
const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
24
|
+
if (!shouldIncludeTemplatePath(relativePath))
|
|
25
|
+
continue;
|
|
26
|
+
const absolutePath = join(current, entry.name);
|
|
27
|
+
if (entry.isDirectory())
|
|
28
|
+
await walk(absolutePath, relativePath);
|
|
29
|
+
else if (entry.isFile()) {
|
|
30
|
+
files.push({
|
|
31
|
+
content: await readFile(absolutePath),
|
|
32
|
+
path: relativePath,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
await walk(root, "");
|
|
38
|
+
return files;
|
|
39
|
+
}
|
|
40
|
+
export function sha256(content) {
|
|
41
|
+
return `sha256:${createHash("sha256").update(content).digest("hex")}`;
|
|
42
|
+
}
|
|
43
|
+
export async function sha256Tree(root) {
|
|
44
|
+
const files = await readTemplateFiles(root);
|
|
45
|
+
const hash = createHash("sha256");
|
|
46
|
+
for (const file of files) {
|
|
47
|
+
hash.update(file.path);
|
|
48
|
+
hash.update("\0");
|
|
49
|
+
hash.update(file.content);
|
|
50
|
+
hash.update("\0");
|
|
51
|
+
}
|
|
52
|
+
return `sha256:${hash.digest("hex")}`;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,YAAY,GAAG,IAAI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,QAAQ,CAAC,YAAY,CAAC;oBACrC,IAAI,EAAE,YAAY;iBACnB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,OAAwB;IAC7C,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,UAAU,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACxC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jarwizz/create-jarshop",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Generate an independent JarShop Client Project.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/jarwizz/jarshop-platform.git",
|
|
10
|
+
"directory": "packages/create-jarshop"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/jarwizz/jarshop-platform/tree/main/packages/create-jarshop#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/jarwizz/jarshop-platform/issues"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=24.18.0 <25"
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"bin": {
|
|
27
|
+
"create-jarshop": "dist/cli.js"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"registry": "https://registry.npmjs.org/",
|
|
32
|
+
"tag": "next",
|
|
33
|
+
"provenance": true
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/cli.d.ts",
|
|
38
|
+
"import": "./dist/cli.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "24.13.3"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.build.json && node ./scripts/copy-template.ts",
|
|
46
|
+
"lint": "eslint src test scripts",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
49
|
+
}
|
|
50
|
+
}
|