Repository navigation
Incorporate CLI that supports all transloadify commands
#369
ci.yml
on: pull_request
Matrix: unit
Matrix: e2e
Build package
42s
Lint (Biome)
17s
Lint (TypeScript)
1m 24s
Upload coverage
0s
Slack notification
0s
Publish to npm
0s
Annotations
3 errors
|
E2E tests (Node 22)
Process completed with exit code 1.
|
|
test/e2e/cli/templates.test.ts > templates > sync > should handle directories recursively:
src/Transloadit.ts#L919
ApiError: API error (HTTP 400) TEMPLATE_NOT_FOUND: There was no Template found for the given template_id and workspace.
❯ Transloadit._remoteJson src/Transloadit.ts:919:19
❯ Transloadit.getTemplate src/Transloadit.ts:676:12
❯ download src/cli/templates.ts:318:20
❯ tryCatch src/alphalib/tryCatch.ts:25:18
❯ Module.sync src/cli/templates.ts:247:17
❯ test/e2e/cli/templates.test.ts:237:9
❯ test/e2e/cli/test-utils.ts:51:14
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'TEMPLATE_NOT_FOUND', rawMessage: 'There was no Template found for the given template_id and workspace.', reason: 'Invalid id/name: A Template with id/name \'6ad5ca9168d342cb87fc714568414261\' doesn\'t exist for this workspace.', assemblySslUrl: undefined, assemblyId: undefined }
Caused by: Caused by: HTTPError: Response code 400 (Bad Request)
❯ Request.<anonymous> node_modules/got/dist/source/as-promise/index.js:92:42
❯ Request._onResponseBase node_modules/got/dist/source/core/index.js:621:22
❯ Request._onResponse node_modules/got/dist/source/core/index.js:661:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { input: undefined, code: 'ERR_NON_2XX_3XX_RESPONSE', response: { _events: { close: undefined, error: 'Function<bound onceWrapper>', data: undefined, end: 'Function<responseOnEnd>', readable: 'Function<anonymous>', aborted: 'Function<bound onceWrapper>' }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: false, needReadable: false, emittedReadable: false, readableListening: true, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: false }, _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'cache-control', 'no-cache', 'transfer-encoding', 'chunked', 'content-type', 'application/json; charset=utf-8', 'access-control-allow-origin', '*', 'access-control-allow-methods', 'POST, GET, PUT, DELETE, OPTIONS', 'access-control-allow-headers', 'X-Requested-With, Content-Type, Cache-Control, Accept, Content-Length, Transloadit-Client, Authorization', 'date', 'Wed, 03 Dec 2025 10:30:09 GMT', 'keep-alive', 'timeout=5', 'access-control-allow-credentials', 'true', 'strict-transport-security', 'max-age=15552001' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: 'https://api2.transloadit.com/templates/6ad5ca9168d342cb87fc714568414261?signature=sha384:8355eb9702af8491f1e1d40ec359b17952e15372440349bc6e045bb739ced78d6e4715d218a9590b322fefaa498bbf4e¶ms=%7B%22auth%22%3A%7B%22key%22%3A%22***%22%2C%22expires%22%3A%222025-12-04T10%3A30%3A09.327Z%22%7D%7D', method: null, statusCode: 400, statusMessage: 'Bad Request', client: { _tlsOptions: { allowHalfOpen: undefined, pipe: false, secureContext: { context: { init: 'Function<init>', setKey: 'Function<setKey>', setCert: 'Function<setCert>', addCACert: 'Function<addCACert>', setAllowPartialTrustChain: 'Function<setAllowPartialTrustChain>', addCRL: 'Function<addCRL>', addRootCerts: 'Function<addRootCerts>', setCipherSuites: 'Function<setCipherSuites>', setCiphers: 'Function<setCiphers>', setSigalgs: 'Function<setSigalgs>', setECDHCurve: 'Function<setECDHCurve>', setDHParam: 'Function<setDHParam>', setMaxProto: 'Function<setMaxProto>', setMinProto: 'Function<setMinProto>', getMaxProto: 'Function<getMaxProto>', getMinProto: 'Function<getMinProto>', setOptions: 'Function<setOptions>', setSessionIdContext: 'Function<setSessionIdContext>', setSessionTimeout: 'Function<setSessionTimeout>', close: 'Function<close>', loadPKCS12: 'Function<loadPKCS12>', setTicketKeys: 'Function<setTicketKeys>', enableTicketKeyCallback: 'Function<enableTicketKeyCallback>', g
|
|
test/e2e/cli/templates.test.ts > templates > modify > should not modify but rename the template:
src/Transloadit.ts#L919
ApiError: API error (HTTP 400) TEMPLATE_VALIDATION_ERROR: Invalid Template name "new-name": please choose another Template name, you already have a Template named 'new-name' in this app.
❯ Transloadit._remoteJson src/Transloadit.ts:919:19
❯ Transloadit.editTemplate src/Transloadit.ts:649:12
❯ Module.modify src/cli/templates.ts:129:5
❯ test/e2e/cli/templates.test.ts:131:9
❯ test/e2e/cli/test-utils.ts:51:14
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'TEMPLATE_VALIDATION_ERROR', rawMessage: 'Invalid Template name "new-name": please choose another Template name, you already have a Template named \'new-name\' in this app.', reason: undefined, assemblySslUrl: undefined, assemblyId: undefined }
Caused by: Caused by: HTTPError: Response code 400 (Bad Request)
❯ Request.<anonymous> node_modules/got/dist/source/as-promise/index.js:92:42
❯ Request._onResponseBase node_modules/got/dist/source/core/index.js:621:22
❯ Request._onResponse node_modules/got/dist/source/core/index.js:661:13
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { input: undefined, code: 'ERR_NON_2XX_3XX_RESPONSE', response: { _events: { close: undefined, error: 'Function<bound onceWrapper>', data: undefined, end: 'Function<responseOnEnd>', readable: 'Function<anonymous>', aborted: 'Function<bound onceWrapper>' }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: false, needReadable: false, emittedReadable: false, readableListening: true, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: false }, _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'cache-control', 'no-cache', 'transfer-encoding', 'chunked', 'content-type', 'application/json; charset=utf-8', 'access-control-allow-origin', '*', 'access-control-allow-methods', 'POST, GET, PUT, DELETE, OPTIONS', 'access-control-allow-headers', 'X-Requested-With, Content-Type, Cache-Control, Accept, Content-Length, Transloadit-Client, Authorization', 'date', 'Wed, 03 Dec 2025 10:30:06 GMT', 'keep-alive', 'timeout=5', 'access-control-allow-credentials', 'true', 'strict-transport-security', 'max-age=15552001' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: 'https://api2.transloadit.com/templates/f338971be6d34f1287dd50004d21c465', method: null, statusCode: 400, statusMessage: 'Bad Request', client: { _tlsOptions: { allowHalfOpen: undefined, pipe: false, secureContext: { context: { init: 'Function<init>', setKey: 'Function<setKey>', setCert: 'Function<setCert>', addCACert: 'Function<addCACert>', setAllowPartialTrustChain: 'Function<setAllowPartialTrustChain>', addCRL: 'Function<addCRL>', addRootCerts: 'Function<addRootCerts>', setCipherSuites: 'Function<setCipherSuites>', setCiphers: 'Function<setCiphers>', setSigalgs: 'Function<setSigalgs>', setECDHCurve: 'Function<setECDHCurve>', setDHParam: 'Function<setDHParam>', setMaxProto: 'Function<setMaxProto>', setMinProto: 'Function<setMinProto>', getMaxProto: 'Function<getMaxProto>', getMinProto: 'Function<getMinProto>', setOptions: 'Function<setOptions>', setSessionIdContext: 'Function<setSessionIdContext>', setSessionTimeout: 'Function<setSessionTimeout>', close: 'Function<close>', loadPKCS12: 'Function<loadPKCS12>', setTicketKeys: 'Function<setTicketKeys>', enableTicketKeyCallback: 'Function<enableTicketKeyCallback>', getTicketKeys: 'Function<getTicketKeys>', getCertificate: 'Function<getCertificate>', getIssuer: 'Function<getIssuer>', setEngineKey: 'Function<setEngineKey>', setClientCertEngine: 'Function<setClientCertEngine>', _external: {}, constructor: 'Function<SecureContext>' }, c
|