@applicaster/zapplicaster-cli 16.0.0-rc.133 → 16.0.0-rc.135

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapplicaster-cli",
3
- "version": "16.0.0-rc.133",
3
+ "version": "16.0.0-rc.135",
4
4
  "description": "CLI Tool for the zapp app and Quick Brick project",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/zapp-react-dom-cli-template": "16.0.0-rc.133",
32
- "@applicaster/zapp-react-native-android-tv-cli-template": "16.0.0-rc.133",
33
- "@applicaster/zapp-react-native-cli-template": "16.0.0-rc.133",
34
- "@applicaster/zapp-react-native-tvos-cli-template": "16.0.0-rc.133",
31
+ "@applicaster/zapp-react-dom-cli-template": "16.0.0-rc.135",
32
+ "@applicaster/zapp-react-native-android-tv-cli-template": "16.0.0-rc.135",
33
+ "@applicaster/zapp-react-native-cli-template": "16.0.0-rc.135",
34
+ "@applicaster/zapp-react-native-tvos-cli-template": "16.0.0-rc.135",
35
35
  "axios": "^0.28.0",
36
36
  "camelize": "^1.0.0",
37
37
  "chalk": "^2.3.2",
@@ -42,99 +42,17 @@ For years, publishing a QuickBrick release required spawning hundreds of Ruby CL
42
42
 
43
43
  ---
44
44
 
45
- ## 🏗️ Architecture: Before vs After
46
-
47
- ### Legacy v1 Architecture (Slow & Fragile)
48
- ```mermaid
49
- flowchart TD
50
- subgraph Legacy [Legacy Zappifest v1]
51
- A[Yarn Deploy Script] --> B[Plugin 1]
52
- B --> C1[Fork: ruby zappifest iOS]
53
- B --> C2[Fork: ruby zappifest Android]
54
- B --> C3[Fork: ruby zappifest TVOS]
55
- B --> C4[Fork: ruby zappifest Samsung]
56
- B --> C5[Fork: ruby zappifest LG...]
57
- C1 --> D1[Slow Boot & Auth]
58
- C2 --> D2[Slow Boot & Auth]
59
- C3 --> D3[Slow Boot & Auth]
60
- C4 --> D4[Slow Boot & Auth]
61
- C5 --> D5[Slow Boot & Auth]
62
- D1 --> E[Total Time: ~14 Minutes]
63
- end
64
- ```
65
-
66
- ### Zappifest Nano Architecture (Blazing Fast)
67
- ```mermaid
68
- flowchart TD
69
- subgraph Nano [Zappifest Nano v2]
70
- P[Topological Batch Queue] --> W1[Worker 1]
71
- P --> W2[Worker 2]
72
- P --> W3[Worker 3]
73
- P --> W4[Worker 4]
74
- W1 --> L1[Direct .json Lookup ~120ms]
75
- L1 --> U1[Promise.all: Upload All 9 Manifests in Parallel]
76
- U1 --> R[Total Time: ~4 Minutes 🚀]
77
- end
78
- ```
79
-
80
- ---
81
-
82
- ## 🛠️ Key Technical Superpowers
83
-
84
- ### 1. Parallel Platform Manifest Uploads
85
- Instead of shelling out to publish 9 manifests one after another, Zappifest Nano reads all generated manifests in-memory and dispatches them directly via `Promise.all`:
86
- ```typescript
87
- await Promise.all(
88
- manifests.map(async (manifest) => {
89
- await uploadPluginVersion({ pluginId: plugin.id, manifest });
90
- })
91
- );
92
- ```
93
-
94
- ### 2. Topological Dependency Batching with Worker Pools
95
- Plugins and core framework packages form a Directed Acyclic Graph (DAG). Packages in the same dependency tier publish in parallel using a resilient 4-worker queue pool:
96
- ```typescript
97
- const BATCH_CONCURRENCY = 4;
98
- const workers = Array.from({ length: concurrency }, async () => {
99
- while (currentIndex < batch.length) {
100
- const index = currentIndex++;
101
- await batch[index].publish(version);
102
- }
103
- });
104
- await Promise.all(workers);
105
- ```
106
-
107
- ### 3. CloudFront WAF Compliance
108
- Zapp's edge infrastructure protects the Admin API via CloudFront WAF rules. Zappifest Nano handles user agent negotiation and native multipart streaming seamlessly:
109
- - **User-Agent**: Explicitly identifies with authorized `Zappifest/0.66.0` signature.
110
- - **REST Endpoints**: Calls `/plugins/${slug}.json` directly, eliminating Rails 406 format errors.
111
-
112
- ### 4. Dynamic Target & Framework ID Mapping
113
- Rails model validations on Zapp Admin require integer database IDs for targets and UI frameworks rather than raw manifest strings. Zappifest Nano automatically resolves and caches these mappings:
114
- - `mobile` ➔ `[1]`
115
- - `tv` ➔ `[2]`
116
- - `quickbrick` ➔ `[2]`
117
-
118
- ### 5. Atomic Workspace File Writes
119
- Under heavy concurrent publishing, npm CLI traverses parent directories to discover workspaces. Zappifest Nano guarantees zero-byte file read errors through atomic temporary file generation and filesystem renames:
120
- ```typescript
121
- const tmpPath = `${targetPath}.tmp.${Date.now()}.${Math.random().toString(36).slice(2, 6)}`;
122
- await fs.promises.writeFile(tmpPath, data, options);
123
- await fs.promises.rename(tmpPath, targetPath);
124
- ```
125
-
126
- ---
127
-
128
- ## 🛡️ Escape Hatch: Legacy Fallback
129
-
130
- If for any troubleshooting reason you ever need to fall back to the legacy Ruby CLI, simply set the environment variable:
131
-
132
- ```bash
133
- export USE_LEGACY_ZAPPIFEST=true
134
- ```
135
-
136
- *(Warning: doing so will bring back the 14-minute deploy time!)*
137
-
138
- ---
139
-
140
- *Engineered with pride for the QuickBrick developer community.*
45
+ The checked-in primary-image recipe no longer installs Ruby or zappifest.
46
+ Publishing uses the workspace dependency. The existing prebuilt
47
+ `applicaster/quick-brick:3.0` image is unchanged until the image is rebuilt and
48
+ released separately; this migration does not require that image release.
49
+
50
+ Deploy fetches full commit history and release tags for the current branch
51
+ without historical file contents (`--filter=blob:none`). Git can fetch those
52
+ contents on demand. The checkout stays at the pipeline commit even if the remote
53
+ branch has advanced.
54
+
55
+ Plugin publishing keeps npm workspace discovery enabled so it can load the
56
+ repository-root `.npmrc` for authentication. Framework package versions are
57
+ written atomically so concurrent npm workspace scans never read a partially
58
+ written `package.json`.