@tanqory/partner-cli 0.0.0-stage → 0.1.0-alpha.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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/bin/tanqory-partner.mjs +10 -0
  3. package/config/mirror-allowlist.json +17 -0
  4. package/config/theme-licences.json +108 -0
  5. package/config/third-party-toolchains.json +45 -0
  6. package/lib/api.mjs +109 -0
  7. package/lib/auth.mjs +211 -0
  8. package/lib/check.mjs +66 -0
  9. package/lib/cli.mjs +217 -0
  10. package/lib/mcp.mjs +177 -0
  11. package/lib/ops.mjs +179 -0
  12. package/lib/theme.mjs +121 -0
  13. package/lib/vendor/partner-checks.cjs +2420 -0
  14. package/package.json +59 -4
  15. package/starter/LICENSE +18 -0
  16. package/starter/README.md +44 -0
  17. package/starter/config/settings.json +5 -0
  18. package/starter/gitignore +3 -0
  19. package/starter/locales/en.json +22 -0
  20. package/starter/locales/en.schema.json +69 -0
  21. package/starter/locales/th.json +22 -0
  22. package/starter/locales/th.schema.json +69 -0
  23. package/starter/package.json +29 -0
  24. package/starter/regions/footer.json +35 -0
  25. package/starter/regions/header.json +13 -0
  26. package/starter/scripts/build.mjs +211 -0
  27. package/starter/scripts/probe.ts +4 -0
  28. package/starter/src/bundle.ts +15 -0
  29. package/starter/src/components/parts.tsx +32 -0
  30. package/starter/src/entry.client.tsx +6 -0
  31. package/starter/src/entry.server.tsx +13 -0
  32. package/starter/src/sections/chrome.tsx +132 -0
  33. package/starter/src/sections/commerce.tsx +242 -0
  34. package/starter/src/sections/content.tsx +115 -0
  35. package/starter/src/sections/editorial.tsx +232 -0
  36. package/starter/src/settings.ts +12 -0
  37. package/starter/src/styles/theme.css +241 -0
  38. package/starter/src/templates.ts +14 -0
  39. package/starter/src/theme.tsx +86 -0
  40. package/starter/templates/404.json +14 -0
  41. package/starter/templates/account.json +14 -0
  42. package/starter/templates/article.json +14 -0
  43. package/starter/templates/blog.json +14 -0
  44. package/starter/templates/cart.json +14 -0
  45. package/starter/templates/collection.json +14 -0
  46. package/starter/templates/index.json +116 -0
  47. package/starter/templates/page.contact.json +22 -0
  48. package/starter/templates/page.json +14 -0
  49. package/starter/templates/product.json +18 -0
  50. package/starter/templates/search.json +14 -0
  51. package/starter/tsconfig.json +17 -0
  52. package/starter/vite.client.config.ts +17 -0
  53. package/starter/vite.probe.config.ts +16 -0
  54. package/starter/vite.server.config.ts +32 -0
  55. package/README.md +0 -3
@@ -0,0 +1,14 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "blog",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "blog-1",
9
+ "type": "blog"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "cart",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "cart-1",
9
+ "type": "cart"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "collection",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "collection-1",
9
+ "type": "collection"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "index",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "hero-1",
9
+ "type": "hero",
10
+ "settings": {
11
+ "kicker": "New season",
12
+ "heading": "Made to be used every day",
13
+ "body": "<p>Simple things, made well and made to last.</p>",
14
+ "buttonLabel": "Shop all",
15
+ "buttonLink": "/collections/all"
16
+ }
17
+ },
18
+ {
19
+ "id": "shelf-1",
20
+ "type": "featured-collection",
21
+ "settings": {
22
+ "heading": "Featured products",
23
+ "collection": "all",
24
+ "count": 8
25
+ }
26
+ },
27
+ {
28
+ "id": "features-1",
29
+ "type": "features",
30
+ "settings": {
31
+ "heading": "Why shop with us",
32
+ "columns": "3"
33
+ },
34
+ "blocks": [
35
+ {
36
+ "id": "feature-1",
37
+ "type": "feature",
38
+ "settings": {
39
+ "heading": "Free delivery",
40
+ "text": "On every order over 1,000 baht."
41
+ }
42
+ },
43
+ {
44
+ "id": "feature-2",
45
+ "type": "feature",
46
+ "settings": {
47
+ "heading": "Easy returns",
48
+ "text": "Send it back within 30 days, no questions asked."
49
+ }
50
+ },
51
+ {
52
+ "id": "feature-3",
53
+ "type": "feature",
54
+ "settings": {
55
+ "heading": "Made to last",
56
+ "text": "Good materials, checked by hand before they ship."
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "id": "quotes-1",
63
+ "type": "testimonials",
64
+ "settings": {
65
+ "heading": "What customers say"
66
+ },
67
+ "blocks": [
68
+ {
69
+ "id": "quote-1",
70
+ "type": "testimonial",
71
+ "settings": {
72
+ "quote": "The best thing I bought this year.",
73
+ "name": "Somchai P.",
74
+ "detail": "Bangkok"
75
+ }
76
+ },
77
+ {
78
+ "id": "quote-2",
79
+ "type": "testimonial",
80
+ "settings": {
81
+ "quote": "Arrived in two days, packed with care.",
82
+ "name": "Anna K.",
83
+ "detail": "Chiang Mai"
84
+ }
85
+ },
86
+ {
87
+ "id": "quote-3",
88
+ "type": "testimonial",
89
+ "settings": {
90
+ "quote": "I ordered a second one for my sister.",
91
+ "name": "Nok S.",
92
+ "detail": "Phuket"
93
+ }
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "id": "note-1",
99
+ "type": "rich-text",
100
+ "settings": {
101
+ "heading": "About us",
102
+ "body": "<p>Tell shoppers who you are and what you make.</p>"
103
+ }
104
+ },
105
+ {
106
+ "id": "letters-1",
107
+ "type": "newsletter",
108
+ "settings": {
109
+ "heading": "Stay in touch",
110
+ "body": "News and offers, now and then."
111
+ }
112
+ }
113
+ ]
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "page.contact",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "page-1",
9
+ "type": "page"
10
+ },
11
+ {
12
+ "id": "contact-1",
13
+ "type": "contact-form",
14
+ "settings": {
15
+ "heading": "Contact us",
16
+ "intro": "Write to us and we will answer within one working day."
17
+ }
18
+ }
19
+ ]
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "page",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "page-1",
9
+ "type": "page"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "product",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "product-1",
9
+ "type": "product"
10
+ },
11
+ {
12
+ "id": "recs-1",
13
+ "type": "product-recommendations"
14
+ }
15
+ ]
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "contentVersion": 1,
3
+ "template": "search",
4
+ "regions": {
5
+ "main": {
6
+ "sections": [
7
+ {
8
+ "id": "search-1",
9
+ "type": "search"
10
+ }
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "noUnusedLocals": true,
10
+ "noUnusedParameters": true,
11
+ "resolveJsonModule": true,
12
+ "skipLibCheck": true,
13
+ "noEmit": true,
14
+ "types": ["vite/client"]
15
+ },
16
+ "include": ["src", "scripts/probe.ts"]
17
+ }
@@ -0,0 +1,17 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // The browser bundle → dist/build/client. `base: './'`: the asset origin and its /a/<digest>/client prefix
5
+ // are known only once the platform has built the artifact, so every URL stays relative to its file.
6
+ export default defineConfig({
7
+ plugins: [react()],
8
+ base: './',
9
+ build: {
10
+ outDir: 'dist/build/client',
11
+ emptyOutDir: true,
12
+ manifest: true,
13
+ target: 'es2022',
14
+ sourcemap: false,
15
+ rollupOptions: { input: 'src/entry.client.tsx' },
16
+ },
17
+ })
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // The theme's declarations for Node (scripts/build.mjs reads them to write the manifest). The kit is
5
+ // bundled in so its `import.meta.env` reads are defined; React stays external.
6
+ export default defineConfig({
7
+ plugins: [react()],
8
+ ssr: { noExternal: ['@tanqory/theme-kit'] },
9
+ build: {
10
+ ssr: 'scripts/probe.ts',
11
+ outDir: 'dist/.probe',
12
+ emptyOutDir: true,
13
+ target: 'node20',
14
+ rollupOptions: { output: { entryFileNames: 'probe.mjs', format: 'es' } },
15
+ },
16
+ })
@@ -0,0 +1,32 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // The serve entry → dist/build/server/entry.mjs: ONE ES module, everything inlined, no imports, no dynamic
5
+ // import(), no Node built-ins (Theme ABI v2 §1, §11). Browser-only globals are compile-time `undefined` here:
6
+ // every use sits behind a `typeof window` guard or in an effect that never runs during the server render, so
7
+ // the minifier drops those branches and the entry has no free identifier outside the ABI's globals.
8
+ const BROWSER_ONLY = [
9
+ 'window', 'document', 'location', 'history', 'self', 'localStorage', 'sessionStorage',
10
+ 'requestAnimationFrame', 'cancelAnimationFrame', 'getComputedStyle', 'matchMedia', 'CSS',
11
+ 'DOMParser', 'MutationObserver', 'ResizeObserver', 'IntersectionObserver', 'HTMLElement',
12
+ 'MessageChannel', 'setImmediate', 'MSApp', 'reportError', '__REACT_DEVTOOLS_GLOBAL_HOOK__',
13
+ ]
14
+
15
+ export default defineConfig({
16
+ plugins: [react()],
17
+ define: {
18
+ 'process.env.NODE_ENV': '"production"',
19
+ ...Object.fromEntries(BROWSER_ONLY.map((name) => [name, 'undefined'])),
20
+ },
21
+ ssr: { noExternal: true, target: 'webworker' },
22
+ resolve: { conditions: ['workerd', 'worker', 'browser', 'module', 'import', 'default'] },
23
+ build: {
24
+ ssr: 'src/entry.server.tsx',
25
+ outDir: 'dist/build/server',
26
+ emptyOutDir: true,
27
+ target: 'es2022',
28
+ minify: 'esbuild',
29
+ sourcemap: false,
30
+ rollupOptions: { output: { entryFileNames: 'entry.mjs', format: 'es', inlineDynamicImports: true } },
31
+ },
32
+ })
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.