zapier-platform-cli 17.6.0 → 17.7.0

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.
@@ -652,6 +652,13 @@
652
652
  "multiple": false,
653
653
  "type": "option"
654
654
  },
655
+ "paging-token": {
656
+ "description": "Set bundle.meta.paging_token. Used for search pagination or bulk reads. When used in production, this indicates which page of items you should fetch.",
657
+ "name": "paging-token",
658
+ "hasDynamicHelp": false,
659
+ "multiple": false,
660
+ "type": "option"
661
+ },
655
662
  "debug": {
656
663
  "char": "d",
657
664
  "description": "Show extra debugging output.",
@@ -1705,88 +1712,6 @@
1705
1712
  "clear.js"
1706
1713
  ]
1707
1714
  },
1708
- "delete:integration": {
1709
- "aliases": [
1710
- "delete:app"
1711
- ],
1712
- "args": {},
1713
- "description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
1714
- "flags": {
1715
- "debug": {
1716
- "char": "d",
1717
- "description": "Show extra debugging output.",
1718
- "name": "debug",
1719
- "allowNo": false,
1720
- "type": "boolean"
1721
- },
1722
- "invokedFromAnotherCommand": {
1723
- "hidden": true,
1724
- "name": "invokedFromAnotherCommand",
1725
- "allowNo": false,
1726
- "type": "boolean"
1727
- }
1728
- },
1729
- "hasDynamicHelp": false,
1730
- "hiddenAliases": [],
1731
- "id": "delete:integration",
1732
- "pluginAlias": "zapier-platform-cli",
1733
- "pluginName": "zapier-platform-cli",
1734
- "pluginType": "core",
1735
- "strict": true,
1736
- "enableJsonFlag": false,
1737
- "skipValidInstallCheck": true,
1738
- "isESM": false,
1739
- "relativePath": [
1740
- "src",
1741
- "oclif",
1742
- "commands",
1743
- "delete",
1744
- "integration.js"
1745
- ]
1746
- },
1747
- "delete:version": {
1748
- "aliases": [],
1749
- "args": {
1750
- "version": {
1751
- "description": "Specify the version to delete. It must have no users or Zaps.",
1752
- "name": "version",
1753
- "required": true
1754
- }
1755
- },
1756
- "description": "Delete a specific version of your integration.\n\nThis only works if there are no users or Zaps on that version. You will probably need to have run `zapier migrate` and `zapier deprecate` before this command will work.",
1757
- "flags": {
1758
- "debug": {
1759
- "char": "d",
1760
- "description": "Show extra debugging output.",
1761
- "name": "debug",
1762
- "allowNo": false,
1763
- "type": "boolean"
1764
- },
1765
- "invokedFromAnotherCommand": {
1766
- "hidden": true,
1767
- "name": "invokedFromAnotherCommand",
1768
- "allowNo": false,
1769
- "type": "boolean"
1770
- }
1771
- },
1772
- "hasDynamicHelp": false,
1773
- "hiddenAliases": [],
1774
- "id": "delete:version",
1775
- "pluginAlias": "zapier-platform-cli",
1776
- "pluginName": "zapier-platform-cli",
1777
- "pluginType": "core",
1778
- "strict": true,
1779
- "enableJsonFlag": false,
1780
- "skipValidInstallCheck": true,
1781
- "isESM": false,
1782
- "relativePath": [
1783
- "src",
1784
- "oclif",
1785
- "commands",
1786
- "delete",
1787
- "version.js"
1788
- ]
1789
- },
1790
1715
  "canary:create": {
1791
1716
  "aliases": [],
1792
1717
  "args": {
@@ -2151,9 +2076,91 @@
2151
2076
  "unset.js"
2152
2077
  ]
2153
2078
  },
2154
- "users:add": {
2079
+ "delete:integration": {
2155
2080
  "aliases": [
2156
- "users:invite"
2081
+ "delete:app"
2082
+ ],
2083
+ "args": {},
2084
+ "description": "Delete your integration (including all versions).\n\nThis only works if there are no active users or Zaps on any version. If you only want to delete certain versions, use the `zapier delete:version` command instead. It's unlikely that you'll be able to run this on an app that you've pushed publicly, since there are usually still users.",
2085
+ "flags": {
2086
+ "debug": {
2087
+ "char": "d",
2088
+ "description": "Show extra debugging output.",
2089
+ "name": "debug",
2090
+ "allowNo": false,
2091
+ "type": "boolean"
2092
+ },
2093
+ "invokedFromAnotherCommand": {
2094
+ "hidden": true,
2095
+ "name": "invokedFromAnotherCommand",
2096
+ "allowNo": false,
2097
+ "type": "boolean"
2098
+ }
2099
+ },
2100
+ "hasDynamicHelp": false,
2101
+ "hiddenAliases": [],
2102
+ "id": "delete:integration",
2103
+ "pluginAlias": "zapier-platform-cli",
2104
+ "pluginName": "zapier-platform-cli",
2105
+ "pluginType": "core",
2106
+ "strict": true,
2107
+ "enableJsonFlag": false,
2108
+ "skipValidInstallCheck": true,
2109
+ "isESM": false,
2110
+ "relativePath": [
2111
+ "src",
2112
+ "oclif",
2113
+ "commands",
2114
+ "delete",
2115
+ "integration.js"
2116
+ ]
2117
+ },
2118
+ "delete:version": {
2119
+ "aliases": [],
2120
+ "args": {
2121
+ "version": {
2122
+ "description": "Specify the version to delete. It must have no users or Zaps.",
2123
+ "name": "version",
2124
+ "required": true
2125
+ }
2126
+ },
2127
+ "description": "Delete a specific version of your integration.\n\nThis only works if there are no users or Zaps on that version. You will probably need to have run `zapier migrate` and `zapier deprecate` before this command will work.",
2128
+ "flags": {
2129
+ "debug": {
2130
+ "char": "d",
2131
+ "description": "Show extra debugging output.",
2132
+ "name": "debug",
2133
+ "allowNo": false,
2134
+ "type": "boolean"
2135
+ },
2136
+ "invokedFromAnotherCommand": {
2137
+ "hidden": true,
2138
+ "name": "invokedFromAnotherCommand",
2139
+ "allowNo": false,
2140
+ "type": "boolean"
2141
+ }
2142
+ },
2143
+ "hasDynamicHelp": false,
2144
+ "hiddenAliases": [],
2145
+ "id": "delete:version",
2146
+ "pluginAlias": "zapier-platform-cli",
2147
+ "pluginName": "zapier-platform-cli",
2148
+ "pluginType": "core",
2149
+ "strict": true,
2150
+ "enableJsonFlag": false,
2151
+ "skipValidInstallCheck": true,
2152
+ "isESM": false,
2153
+ "relativePath": [
2154
+ "src",
2155
+ "oclif",
2156
+ "commands",
2157
+ "delete",
2158
+ "version.js"
2159
+ ]
2160
+ },
2161
+ "team:add": {
2162
+ "aliases": [
2163
+ "team:invite"
2157
2164
  ],
2158
2165
  "args": {
2159
2166
  "email": {
@@ -2161,24 +2168,28 @@
2161
2168
  "name": "email",
2162
2169
  "required": true
2163
2170
  },
2164
- "version": {
2165
- "description": "A version string (like 1.2.3). Optional, used only if you want to invite a user to a specific version instead of all versions.",
2166
- "name": "version"
2171
+ "role": {
2172
+ "description": "The level the invited team member should be at. Admins can edit everything and get email updates. Collaborators have read-access to the app and get email updates. Subscribers only get email updates.",
2173
+ "name": "role",
2174
+ "options": [
2175
+ "admin",
2176
+ "collaborator",
2177
+ "subscriber"
2178
+ ],
2179
+ "required": true
2180
+ },
2181
+ "message": {
2182
+ "description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
2183
+ "name": "message"
2167
2184
  }
2168
2185
  },
2169
- "description": "Add a user to some or all versions of your integration.\n\nWhen this command is run, we'll send an email to the user inviting them to try your integration. You can track the status of that invite using the `zapier users:get` command.\n\nInvited users will be able to see your integration's name, logo, and description. They'll also be able to create Zaps using any available triggers and actions.",
2186
+ "description": "Add a team member to your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nTeam members can be freely added and removed.",
2170
2187
  "examples": [
2171
- "zapier users:add bruce@wayne.com",
2172
- "zapier users:add alfred@wayne.com 1.2.3"
2188
+ "zapier team:add bruce@wayne.com admin",
2189
+ "zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
2190
+ "zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
2173
2191
  ],
2174
2192
  "flags": {
2175
- "force": {
2176
- "char": "f",
2177
- "description": "Skip confirmation. Useful for running programatically.",
2178
- "name": "force",
2179
- "allowNo": false,
2180
- "type": "boolean"
2181
- },
2182
2193
  "debug": {
2183
2194
  "char": "d",
2184
2195
  "description": "Show extra debugging output.",
@@ -2195,7 +2206,7 @@
2195
2206
  },
2196
2207
  "hasDynamicHelp": false,
2197
2208
  "hiddenAliases": [],
2198
- "id": "users:add",
2209
+ "id": "team:add",
2199
2210
  "pluginAlias": "zapier-platform-cli",
2200
2211
  "pluginName": "zapier-platform-cli",
2201
2212
  "pluginType": "core",
@@ -2207,16 +2218,16 @@
2207
2218
  "src",
2208
2219
  "oclif",
2209
2220
  "commands",
2210
- "users",
2221
+ "team",
2211
2222
  "add.js"
2212
2223
  ]
2213
2224
  },
2214
- "users:get": {
2225
+ "team:get": {
2215
2226
  "aliases": [
2216
- "users:list"
2227
+ "team:list"
2217
2228
  ],
2218
2229
  "args": {},
2219
- "description": "Get a list of users who have been invited to your integration.\n\nNote that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the `\u001b[36mzapier users:add\u001b[39m` command or the web UI). Users who joined by clicking links generated using the `\u001b[36mzapier user:links\u001b[39m` command won't show up here.",
2230
+ "description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
2220
2231
  "flags": {
2221
2232
  "debug": {
2222
2233
  "char": "d",
@@ -2250,7 +2261,7 @@
2250
2261
  },
2251
2262
  "hasDynamicHelp": false,
2252
2263
  "hiddenAliases": [],
2253
- "id": "users:get",
2264
+ "id": "team:get",
2254
2265
  "pluginAlias": "zapier-platform-cli",
2255
2266
  "pluginName": "zapier-platform-cli",
2256
2267
  "pluginType": "core",
@@ -2262,14 +2273,16 @@
2262
2273
  "src",
2263
2274
  "oclif",
2264
2275
  "commands",
2265
- "users",
2276
+ "team",
2266
2277
  "get.js"
2267
2278
  ]
2268
2279
  },
2269
- "users:links": {
2270
- "aliases": [],
2280
+ "team:remove": {
2281
+ "aliases": [
2282
+ "team:delete"
2283
+ ],
2271
2284
  "args": {},
2272
- "description": "Get a list of links that are used to invite users to your integration.",
2285
+ "description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
2273
2286
  "flags": {
2274
2287
  "debug": {
2275
2288
  "char": "d",
@@ -2278,22 +2291,6 @@
2278
2291
  "allowNo": false,
2279
2292
  "type": "boolean"
2280
2293
  },
2281
- "format": {
2282
- "char": "f",
2283
- "description": "Change the way structured data is presented. If \"json\" or \"raw\", you can pipe the output of the command into other tools, such as jq.",
2284
- "name": "format",
2285
- "default": "table",
2286
- "hasDynamicHelp": false,
2287
- "multiple": false,
2288
- "options": [
2289
- "plain",
2290
- "json",
2291
- "raw",
2292
- "row",
2293
- "table"
2294
- ],
2295
- "type": "option"
2296
- },
2297
2294
  "invokedFromAnotherCommand": {
2298
2295
  "hidden": true,
2299
2296
  "name": "invokedFromAnotherCommand",
@@ -2303,7 +2300,7 @@
2303
2300
  },
2304
2301
  "hasDynamicHelp": false,
2305
2302
  "hiddenAliases": [],
2306
- "id": "users:links",
2303
+ "id": "team:remove",
2307
2304
  "pluginAlias": "zapier-platform-cli",
2308
2305
  "pluginName": "zapier-platform-cli",
2309
2306
  "pluginType": "core",
@@ -2315,26 +2312,34 @@
2315
2312
  "src",
2316
2313
  "oclif",
2317
2314
  "commands",
2318
- "users",
2319
- "links.js"
2315
+ "team",
2316
+ "remove.js"
2320
2317
  ]
2321
2318
  },
2322
- "users:remove": {
2319
+ "users:add": {
2323
2320
  "aliases": [
2324
- "users:delete"
2321
+ "users:invite"
2325
2322
  ],
2326
2323
  "args": {
2327
2324
  "email": {
2328
- "description": "The user to be removed.",
2325
+ "description": "The user to be invited. If they don't have a Zapier account, they'll be prompted to create one.",
2329
2326
  "name": "email",
2330
2327
  "required": true
2328
+ },
2329
+ "version": {
2330
+ "description": "A version string (like 1.2.3). Optional, used only if you want to invite a user to a specific version instead of all versions.",
2331
+ "name": "version"
2331
2332
  }
2332
2333
  },
2333
- "description": "Remove a user from all versions of your integration.\n\nWhen this command is run, their Zaps will immediately turn off. They won't be able to use your app again until they're re-invited or it has gone public. In practice, this command isn't run often as it's very disruptive to users.",
2334
+ "description": "Add a user to some or all versions of your integration.\n\nWhen this command is run, we'll send an email to the user inviting them to try your integration. You can track the status of that invite using the `zapier users:get` command.\n\nInvited users will be able to see your integration's name, logo, and description. They'll also be able to create Zaps using any available triggers and actions.",
2335
+ "examples": [
2336
+ "zapier users:add bruce@wayne.com",
2337
+ "zapier users:add alfred@wayne.com 1.2.3"
2338
+ ],
2334
2339
  "flags": {
2335
2340
  "force": {
2336
2341
  "char": "f",
2337
- "description": "Skips confirmation. Useful for running programatically.",
2342
+ "description": "Skip confirmation. Useful for running programatically.",
2338
2343
  "name": "force",
2339
2344
  "allowNo": false,
2340
2345
  "type": "boolean"
@@ -2355,7 +2360,7 @@
2355
2360
  },
2356
2361
  "hasDynamicHelp": false,
2357
2362
  "hiddenAliases": [],
2358
- "id": "users:remove",
2363
+ "id": "users:add",
2359
2364
  "pluginAlias": "zapier-platform-cli",
2360
2365
  "pluginName": "zapier-platform-cli",
2361
2366
  "pluginType": "core",
@@ -2368,40 +2373,15 @@
2368
2373
  "oclif",
2369
2374
  "commands",
2370
2375
  "users",
2371
- "remove.js"
2376
+ "add.js"
2372
2377
  ]
2373
2378
  },
2374
- "team:add": {
2379
+ "users:get": {
2375
2380
  "aliases": [
2376
- "team:invite"
2377
- ],
2378
- "args": {
2379
- "email": {
2380
- "description": "The user to be invited. If they don't have a Zapier account, they'll be prompted to create one.",
2381
- "name": "email",
2382
- "required": true
2383
- },
2384
- "role": {
2385
- "description": "The level the invited team member should be at. Admins can edit everything and get email updates. Collaborators have read-access to the app and get email updates. Subscribers only get email updates.",
2386
- "name": "role",
2387
- "options": [
2388
- "admin",
2389
- "collaborator",
2390
- "subscriber"
2391
- ],
2392
- "required": true
2393
- },
2394
- "message": {
2395
- "description": "A message sent in the email to your team member, if you need to provide context. Wrap the message in quotes to ensure spaces get saved.",
2396
- "name": "message"
2397
- }
2398
- },
2399
- "description": "Add a team member to your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nTeam members can be freely added and removed.",
2400
- "examples": [
2401
- "zapier team:add bruce@wayne.com admin",
2402
- "zapier team:add robin@wayne.com collaborator \"Hey Robin, check out this app.\"",
2403
- "zapier team:add alfred@wayne.com subscriber \"Hey Alfred, check out this app.\""
2381
+ "users:list"
2404
2382
  ],
2383
+ "args": {},
2384
+ "description": "Get a list of users who have been invited to your integration.\n\nNote that this list of users is NOT a comprehensive list of everyone who is using your integration. It only includes users who were invited directly by email (using the `\u001b[36mzapier users:add\u001b[39m` command or the web UI). Users who joined by clicking links generated using the `\u001b[36mzapier user:links\u001b[39m` command won't show up here.",
2405
2385
  "flags": {
2406
2386
  "debug": {
2407
2387
  "char": "d",
@@ -2410,6 +2390,22 @@
2410
2390
  "allowNo": false,
2411
2391
  "type": "boolean"
2412
2392
  },
2393
+ "format": {
2394
+ "char": "f",
2395
+ "description": "Change the way structured data is presented. If \"json\" or \"raw\", you can pipe the output of the command into other tools, such as jq.",
2396
+ "name": "format",
2397
+ "default": "table",
2398
+ "hasDynamicHelp": false,
2399
+ "multiple": false,
2400
+ "options": [
2401
+ "plain",
2402
+ "json",
2403
+ "raw",
2404
+ "row",
2405
+ "table"
2406
+ ],
2407
+ "type": "option"
2408
+ },
2413
2409
  "invokedFromAnotherCommand": {
2414
2410
  "hidden": true,
2415
2411
  "name": "invokedFromAnotherCommand",
@@ -2419,7 +2415,7 @@
2419
2415
  },
2420
2416
  "hasDynamicHelp": false,
2421
2417
  "hiddenAliases": [],
2422
- "id": "team:add",
2418
+ "id": "users:get",
2423
2419
  "pluginAlias": "zapier-platform-cli",
2424
2420
  "pluginName": "zapier-platform-cli",
2425
2421
  "pluginType": "core",
@@ -2431,16 +2427,14 @@
2431
2427
  "src",
2432
2428
  "oclif",
2433
2429
  "commands",
2434
- "team",
2435
- "add.js"
2430
+ "users",
2431
+ "get.js"
2436
2432
  ]
2437
2433
  },
2438
- "team:get": {
2439
- "aliases": [
2440
- "team:list"
2441
- ],
2434
+ "users:links": {
2435
+ "aliases": [],
2442
2436
  "args": {},
2443
- "description": "Get team members involved with your integration.\n\nThese users come in three levels:\n\n * `admin`, who can edit everything about the integration\n * `collaborator`, who has read-only access for the app, and will receive periodic email updates. These updates include quarterly health scores and more.\n * `subscriber`, who can't directly access the app, but will receive periodic email updates. These updates include quarterly health scores and more.\n\nUse the `zapier team:add` and `zapier team:remove` commands to modify your team.\n",
2437
+ "description": "Get a list of links that are used to invite users to your integration.",
2444
2438
  "flags": {
2445
2439
  "debug": {
2446
2440
  "char": "d",
@@ -2474,7 +2468,7 @@
2474
2468
  },
2475
2469
  "hasDynamicHelp": false,
2476
2470
  "hiddenAliases": [],
2477
- "id": "team:get",
2471
+ "id": "users:links",
2478
2472
  "pluginAlias": "zapier-platform-cli",
2479
2473
  "pluginName": "zapier-platform-cli",
2480
2474
  "pluginType": "core",
@@ -2486,17 +2480,30 @@
2486
2480
  "src",
2487
2481
  "oclif",
2488
2482
  "commands",
2489
- "team",
2490
- "get.js"
2483
+ "users",
2484
+ "links.js"
2491
2485
  ]
2492
2486
  },
2493
- "team:remove": {
2487
+ "users:remove": {
2494
2488
  "aliases": [
2495
- "team:delete"
2489
+ "users:delete"
2496
2490
  ],
2497
- "args": {},
2498
- "description": "Remove a team member from all versions of your integration.\n\nAdmins will immediately lose write access to the integration.\nCollaborators will immediately lose read access to the integration.\nSubscribers won't receive future email updates.",
2491
+ "args": {
2492
+ "email": {
2493
+ "description": "The user to be removed.",
2494
+ "name": "email",
2495
+ "required": true
2496
+ }
2497
+ },
2498
+ "description": "Remove a user from all versions of your integration.\n\nWhen this command is run, their Zaps will immediately turn off. They won't be able to use your app again until they're re-invited or it has gone public. In practice, this command isn't run often as it's very disruptive to users.",
2499
2499
  "flags": {
2500
+ "force": {
2501
+ "char": "f",
2502
+ "description": "Skips confirmation. Useful for running programatically.",
2503
+ "name": "force",
2504
+ "allowNo": false,
2505
+ "type": "boolean"
2506
+ },
2500
2507
  "debug": {
2501
2508
  "char": "d",
2502
2509
  "description": "Show extra debugging output.",
@@ -2513,7 +2520,7 @@
2513
2520
  },
2514
2521
  "hasDynamicHelp": false,
2515
2522
  "hiddenAliases": [],
2516
- "id": "team:remove",
2523
+ "id": "users:remove",
2517
2524
  "pluginAlias": "zapier-platform-cli",
2518
2525
  "pluginName": "zapier-platform-cli",
2519
2526
  "pluginType": "core",
@@ -2525,10 +2532,10 @@
2525
2532
  "src",
2526
2533
  "oclif",
2527
2534
  "commands",
2528
- "team",
2535
+ "users",
2529
2536
  "remove.js"
2530
2537
  ]
2531
2538
  }
2532
2539
  },
2533
- "version": "17.6.0"
2540
+ "version": "17.7.0"
2534
2541
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapier-platform-cli",
3
- "version": "17.6.0",
3
+ "version": "17.7.0",
4
4
  "description": "The CLI for managing integrations in Zapier Developer Platform.",
5
5
  "repository": "zapier/zapier-platform",
6
6
  "homepage": "https://platform.zapier.com/",
@@ -25,16 +25,16 @@
25
25
  "docs": "ZAPIER_BASE_ENDPOINT='' node scripts/docs.js",
26
26
  "preversion": "git pull && yarn validate",
27
27
  "prepack": "oclif manifest",
28
- "postpack": "rm -f oclif.manifest.json",
28
+ "postpack": "rimraf oclif.manifest.json",
29
29
  "precommit": "yarn docs && git add docs",
30
30
  "version": "yarn docs && git add docs/*",
31
31
  "postversion": "git push && git push --tags",
32
32
  "lint": "eslint src",
33
33
  "lint:fix": "eslint --fix src",
34
- "test": "cross-env NODE_ENV=test mocha -t 50s --recursive src/tests --exit",
35
- "test:debug": "cross-env NODE_ENV=test node inspect ../../node_modules/.bin/mocha -t 50s --recursive src/tests --exit",
36
- "smoke-test": "cross-env NODE_ENV=test mocha -t 2m --recursive src/smoke-tests --exit",
37
- "smoke-test:debug": "cross-env NODE_ENV=test node inspect ../../node_modules/.bin/mocha -t 2m --recursive src/smoke-tests --exit",
34
+ "test": "cross-env NODE_ENV=test mocha -t 200s --recursive src/tests --exit",
35
+ "test:debug": "cross-env NODE_ENV=test node inspect ../../node_modules/.bin/mocha -t 200s --recursive src/tests --exit",
36
+ "smoke-test": "cross-env NODE_ENV=test mocha -t 6m --recursive src/smoke-tests --exit",
37
+ "smoke-test:debug": "cross-env NODE_ENV=test node inspect ../../node_modules/.bin/mocha -t 6m --recursive src/smoke-tests --exit",
38
38
  "validate-templates": "./scripts/validate-app-templates.js",
39
39
  "set-template-versions": "./scripts/set-app-template-versions.js",
40
40
  "validate": "yarn test && yarn smoke-test && yarn lint"
@@ -46,12 +46,12 @@
46
46
  "@oclif/plugin-not-found": "3.2.51",
47
47
  "@oclif/plugin-version": "2.2.28",
48
48
  "adm-zip": "0.5.16",
49
- "decompress": "4.2.1",
50
49
  "archiver": "7.0.1",
51
50
  "chrono-node": "2.8.0",
52
51
  "cli-table3": "0.6.5",
53
52
  "colors": "1.4.0",
54
53
  "debug": "4.4.0",
54
+ "decompress": "4.2.1",
55
55
  "dotenv": "16.5.0",
56
56
  "esbuild": "0.25.4",
57
57
  "fs-extra": "11.2.0",
@@ -73,7 +73,7 @@
73
73
  "semver": "7.7.1",
74
74
  "string-length": "4.0.2",
75
75
  "through2": "4.0.2",
76
- "tmp": "0.2.3",
76
+ "tmp": "0.2.4",
77
77
  "traverse": "0.6.11",
78
78
  "update-notifier": "5.1.0",
79
79
  "yeoman-environment": "3.19.3",
@@ -87,6 +87,7 @@
87
87
  "mock-fs": "^5.5.0",
88
88
  "nock": "^14.0.4",
89
89
  "oclif": "^4.17.46",
90
+ "rimraf": "^5.0.10",
90
91
  "typescript": "^5.8.3",
91
92
  "yamljs": "0.3.0"
92
93
  },
@@ -59,7 +59,14 @@ const loadAuthDataFromEnv = () => {
59
59
  .filter(([k, v]) => k.startsWith(AUTH_FIELD_ENV_PREFIX))
60
60
  .reduce((authData, [k, v]) => {
61
61
  const fieldKey = k.substr(AUTH_FIELD_ENV_PREFIX.length);
62
- authData[fieldKey] = v;
62
+ // Try to parse as JSON if it looks like JSON, otherwise keep as string
63
+ try {
64
+ authData[fieldKey] =
65
+ v.startsWith('{') || v.startsWith('[') ? JSON.parse(v) : v;
66
+ } catch (e) {
67
+ // If JSON parsing fails, keep as string
68
+ authData[fieldKey] = v;
69
+ }
63
70
  return authData;
64
71
  }, {});
65
72
  };
@@ -237,7 +244,10 @@ const appendEnv = async (vars, prefix = '') => {
237
244
  '.env',
238
245
  Object.entries(vars)
239
246
  .filter(([k, v]) => v !== undefined)
240
- .map(([k, v]) => `${prefix}${k}='${v || ''}'\n`),
247
+ .map(
248
+ ([k, v]) =>
249
+ `${prefix}${k}='${typeof v === 'object' && v !== null ? JSON.stringify(v) : v || ''}'\n`,
250
+ ),
241
251
  );
242
252
  };
243
253
 
@@ -1303,6 +1313,7 @@ class InvokeCommand extends BaseCommand {
1303
1313
  isPopulatingDedupe: this.flags.isPopulatingDedupe,
1304
1314
  limit: this.flags.limit,
1305
1315
  page: this.flags.page,
1316
+ paging_token: this.flags['paging-token'],
1306
1317
  isTestingAuth: false, // legacy property
1307
1318
  };
1308
1319
  const output = await this.invokeAction(
@@ -1382,6 +1393,10 @@ InvokeCommand.flags = buildFlags({
1382
1393
  description:
1383
1394
  'EXPERIMENTAL: Instead of using the local .env file, use the production authentication data with the given authentication ID (aka the "app connection" on Zapier). Find them at https://zapier.com/app/assets/connections (https://zpr.io/z8SjFTdnTFZ2 for instructions) or specify \'-\' to interactively select one from your available authentications. When specified, the code will still run locally, but all outgoing requests will be proxied through Zapier with the production auth data.',
1384
1395
  }),
1396
+ 'paging-token': Flags.string({
1397
+ description:
1398
+ 'Set bundle.meta.paging_token. Used for search pagination or bulk reads. When used in production, this indicates which page of items you should fetch.',
1399
+ }),
1385
1400
  },
1386
1401
  });
1387
1402
 
@@ -6,10 +6,18 @@ const yeoman = require('yeoman-environment');
6
6
  const ZapierBaseCommand = require('../ZapierBaseCommand');
7
7
  const { downloadSourceZip } = require('../../utils/api');
8
8
  const { ensureDir, makeTempDir, removeDirSync } = require('../../utils/files');
9
- const { listFiles } = require('../../utils/build');
9
+ const { walkDirWithPresetBlocklist } = require('../../utils/build');
10
10
  const { buildFlags } = require('../buildFlags');
11
11
  const PullGenerator = require('../../generators/pull');
12
12
 
13
+ const listFiles = (dir) => {
14
+ const relPaths = [];
15
+ for (const entry of walkDirWithPresetBlocklist(dir)) {
16
+ relPaths.push(path.join(path.relative(dir, entry.parentPath), entry.name));
17
+ }
18
+ return relPaths;
19
+ };
20
+
13
21
  class PullCommand extends ZapierBaseCommand {
14
22
  async perform() {
15
23
  // Fetch the source zip from API
@@ -28,7 +36,7 @@ class PullCommand extends ZapierBaseCommand {
28
36
 
29
37
  // Prompt user to confirm overwrite
30
38
  const currentDir = process.cwd();
31
- const sourceFiles = await listFiles(srcDst);
39
+ const sourceFiles = listFiles(srcDst);
32
40
 
33
41
  const env = yeoman.createEnv();
34
42
  const namespace = 'zapier:pull';
@@ -272,13 +272,28 @@ const countLeadingDoubleDots = (relPath) => {
272
272
  // Join all relPaths with workingDir and return the common ancestor directory.
273
273
  const findCommonAncestor = (workingDir, relPaths) => {
274
274
  let maxLeadingDoubleDots = 0;
275
- for (const relPath of relPaths) {
276
- maxLeadingDoubleDots = Math.max(
277
- maxLeadingDoubleDots,
278
- countLeadingDoubleDots(relPath),
279
- );
280
- }
281
275
 
276
+ if (isWindows()) {
277
+ for (const relPath of relPaths) {
278
+ if (relPath.match(/^[a-zA-Z]:/)) {
279
+ // On Windows, relPath can be absolute if it starts with a different
280
+ // drive letter than workingDir.
281
+ return 'C:\\';
282
+ } else {
283
+ maxLeadingDoubleDots = Math.max(
284
+ maxLeadingDoubleDots,
285
+ countLeadingDoubleDots(relPath),
286
+ );
287
+ }
288
+ }
289
+ } else {
290
+ for (const relPath of relPaths) {
291
+ maxLeadingDoubleDots = Math.max(
292
+ maxLeadingDoubleDots,
293
+ countLeadingDoubleDots(relPath),
294
+ );
295
+ }
296
+ }
282
297
  let commonAncestor = workingDir;
283
298
  for (let i = 0; i < maxLeadingDoubleDots; i++) {
284
299
  commonAncestor = path.dirname(commonAncestor);
@@ -286,6 +301,10 @@ const findCommonAncestor = (workingDir, relPaths) => {
286
301
  return commonAncestor;
287
302
  };
288
303
 
304
+ const stripDriveLetterForZip = (pathStr) => {
305
+ return pathStr.replace(/^[cC]:\\/, '').replace(/^([a-zA-Z]):/, '$1');
306
+ };
307
+
289
308
  const writeBuildZipDumbly = async (workingDir, zip) => {
290
309
  for (const entry of walkDirWithPresetBlocklist(workingDir)) {
291
310
  const absPath = path.resolve(entry.parentPath, entry.name);
@@ -350,7 +369,7 @@ const writeBuildZipSmartly = async (workingDir, zip) => {
350
369
  // Write required files to the zip
351
370
  for (const relPath of relPaths) {
352
371
  const absPath = path.resolve(workingDir, relPath);
353
- const nameInZip = path.relative(zipRoot, absPath);
372
+ const nameInZip = stripDriveLetterForZip(path.relative(zipRoot, absPath));
354
373
  if (nameInZip === 'package.json' && zipRoot !== workingDir) {
355
374
  // Ignore workspace root's package.json
356
375
  continue;
@@ -388,10 +407,10 @@ const writeBuildZipSmartly = async (workingDir, zip) => {
388
407
  symlink.parentPath,
389
408
  symlink.name,
390
409
  );
391
- const nameInZip = path.relative(zipRoot, absPath);
410
+ const nameInZip = stripDriveLetterForZip(path.relative(zipRoot, absPath));
392
411
  const targetInZip = path.relative(
393
- symlink.parentPath,
394
- fs.realpathSync(absPath),
412
+ stripDriveLetterForZip(symlink.parentPath),
413
+ stripDriveLetterForZip(fs.realpathSync(absPath)),
395
414
  );
396
415
  zip.symlink(nameInZip, targetInZip, 0o644);
397
416
  }