diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..2d8b807 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,32 @@ +# This workflow is triggered when a GitHub release is created. +# It can also be run manually to re-publish to NPM in case it failed for some reason. +# You can run this workflow by navigating to https://www.github.com/meorphis/test-repo-9/actions/workflows/publish-npm.yml +name: Publish NPM +on: + workflow_dispatch: + + release: + types: [published] + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: | + yarn install + + - name: Publish to NPM + run: | + bash ./bin/publish-npm + env: + NPM_TOKEN: ${{ secrets.MEORPHIS_TEST_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 0000000..16c3aaf --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,19 @@ +name: Release Doctor +on: + pull_request: + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'meorphis/test-repo-9' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@v4 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + NPM_TOKEN: ${{ secrets.MEORPHIS_TEST_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..d7a8735 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0-alpha.1" +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7227e16..530b325 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,25 +42,25 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -npm install git+ssh://git@github.com:stainless-sdks/meorphis-test-node.git +npm install git+ssh://git@github.com:meorphis/test-repo-9.git ``` Alternatively, to link a local copy of the repo: ```bash # Clone -git clone https://www.github.com/stainless-sdks/meorphis-test-node -cd meorphis-test-node +git clone https://www.github.com/meorphis/test-repo-9 +cd test-repo-9 # With yarn yarn link cd ../my-package -yarn link test3 +yarn link meorphis-test3 # With pnpm pnpm link --global cd ../my-package -pnpm link -—global test3 +pnpm link -—global meorphis-test3 ``` ## Running tests @@ -99,7 +99,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/stainless-sdks/meorphis-test-node/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/meorphis/test-repo-9/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 924962c..9b87275 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Meorphis Test Node API Library -[![NPM version](https://img.shields.io/npm/v/test3.svg)](https://npmjs.org/package/test3) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/test3) +[![NPM version](https://img.shields.io/npm/v/meorphis-test3.svg)](https://npmjs.org/package/meorphis-test3) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/meorphis-test3) This library provides convenient access to the Meorphis Test REST API from server-side TypeScript or JavaScript. @@ -11,19 +11,16 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Installation ```sh -npm install git+ssh://git@github.com:stainless-sdks/meorphis-test-node.git +npm install meorphis-test3 ``` -> [!NOTE] -> Once this package is [published to npm](https://app.stainlessapi.com/docs/guides/publish), this will become: `npm install test3` - ## Usage The full API of this library can be found in [api.md](api.md). ```js -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; const meorphisTest = new MeorphisTest({ environment: 'environment_1', // defaults to 'production' @@ -47,7 +44,7 @@ This library includes TypeScript definitions for all request params and response ```ts -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; const meorphisTest = new MeorphisTest({ environment: 'environment_1', // defaults to 'production' @@ -225,12 +222,12 @@ add the following import before your first import `from "MeorphisTest"`: ```ts // Tell TypeScript and the package to use the global web fetch instead of node-fetch. // Note, despite the name, this does not add any polyfills, but expects them to be provided if needed. -import 'test3/shims/web'; -import MeorphisTest from 'test3'; +import 'meorphis-test3/shims/web'; +import MeorphisTest from 'meorphis-test3'; ``` -To do the inverse, add `import "test3/shims/node"` (which does import polyfills). -This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/stainless-sdks/meorphis-test-node/tree/main/src/_shims#readme)). +To do the inverse, add `import "meorphis-test3/shims/node"` (which does import polyfills). +This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/meorphis/test-repo-9/tree/main/src/_shims#readme)). ### Logging and middleware @@ -239,7 +236,7 @@ which can be used to inspect or alter the `Request` or `Response` before/after e ```ts import { fetch } from 'undici'; // as one example -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; const client = new MeorphisTest({ fetch: async (url: RequestInfo, init?: RequestInit): Promise => { @@ -287,7 +284,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/meorphis-test-node/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/meorphis/test-repo-9/issues) with questions, bugs, or suggestions. ## Requirements @@ -296,7 +293,7 @@ TypeScript >= 4.5 is supported. The following runtimes are supported: - Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions. -- Deno v1.28.0 or higher, using `import MeorphisTest from "npm:test3"`. +- Deno v1.28.0 or higher, using `import MeorphisTest from "npm:meorphis-test3"`. - Bun 1.0 or later. - Cloudflare Workers. - Vercel Edge Runtime. diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 0000000..d4aa254 --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +warnings=() +errors=() + +if [ -z "${NPM_TOKEN}" ]; then + warnings+=("The MEORPHIS_TEST_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") +fi + +lenWarnings=${#warnings[@]} + +if [[ lenWarnings -gt 0 ]]; then + echo -e "Found the following warnings in the release environment:\n" + + for warning in "${warnings[@]}"; do + echo -e "- $warning\n" + done +fi + +lenErrors=${#errors[@]} + +if [[ lenErrors -gt 0 ]]; then + echo -e "Found the following errors in the release environment:\n" + + for error in "${errors[@]}"; do + echo -e "- $error\n" + done + + exit 1 +fi + +echo "The environment is ready to push releases!" diff --git a/jest.config.ts b/jest.config.ts index dd88a6e..ec7ba02 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -7,9 +7,9 @@ const config: JestConfigWithTsJest = { '^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }], }, moduleNameMapper: { - '^test3$': '/src/index.ts', - '^test3/_shims/auto/(.*)$': '/src/_shims/auto/$1-node', - '^test3/(.*)$': '/src/$1', + '^meorphis-test3$': '/src/index.ts', + '^meorphis-test3/_shims/auto/(.*)$': '/src/_shims/auto/$1-node', + '^meorphis-test3/(.*)$': '/src/$1', }, modulePathIgnorePatterns: [ '/ecosystem-tests/', diff --git a/package.json b/package.json index 0e4b5e8..01a4b3f 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "test3", + "name": "meorphis-test3", "version": "0.1.0-alpha.1", "description": "The official TypeScript library for the Meorphis Test API", "author": "Meorphis Test ", "types": "dist/index.d.ts", "main": "dist/index.js", "type": "commonjs", - "repository": "github:stainless-sdks/meorphis-test-node", + "repository": "github:meorphis/test-repo-9", "license": "Apache-2.0", "packageManager": "yarn@1.22.22", "files": [ @@ -60,8 +60,8 @@ "./shims/web.mjs" ], "imports": { - "test3": ".", - "test3/*": "./src/*" + "meorphis-test3": ".", + "meorphis-test3/*": "./src/*" }, "exports": { "./_shims/auto/*": { diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..624ed99 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,67 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "node", + "extra-files": [ + "src/version.ts", + "README.md" + ] +} diff --git a/scripts/build b/scripts/build index f3b9d11..b7b26aa 100755 --- a/scripts/build +++ b/scripts/build @@ -8,7 +8,7 @@ node scripts/utils/check-version.cjs # Build into dist and will publish the package from there, # so that src/resources/foo.ts becomes /resources/foo.js -# This way importing from `"test3/resources/foo"` works +# This way importing from `"meorphis-test3/resources/foo"` works # even with `"moduleResolution": "node"` rm -rf dist; mkdir dist @@ -47,8 +47,8 @@ node scripts/utils/postprocess-files.cjs # make sure that nothing crashes when we require the output CJS or # import the output ESM -(cd dist && node -e 'require("test3")') -(cd dist && node -e 'import("test3")' --input-type=module) +(cd dist && node -e 'require("meorphis-test3")') +(cd dist && node -e 'import("meorphis-test3")' --input-type=module) if command -v deno &> /dev/null && [ -e ./scripts/build-deno ] then diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs index d3c5a04..00e6ac3 100644 --- a/scripts/utils/postprocess-files.cjs +++ b/scripts/utils/postprocess-files.cjs @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); const { parse } = require('@typescript-eslint/parser'); -const pkgImportPath = process.env['PKG_IMPORT_PATH'] ?? 'test3/'; +const pkgImportPath = process.env['PKG_IMPORT_PATH'] ?? 'meorphis-test3/'; const distDir = process.env['DIST_PATH'] ? @@ -142,7 +142,7 @@ async function postprocess() { if (file.endsWith('.d.ts')) { // work around bad tsc behavior - // if we have `import { type Readable } from 'test3/_shims/index'`, + // if we have `import { type Readable } from 'meorphis-test3/_shims/index'`, // tsc sometimes replaces `Readable` with `import("stream").Readable` inline // in the output .d.ts transformed = transformed.replace(/import\("stream"\).Readable/g, 'Readable'); diff --git a/src/_shims/README.md b/src/_shims/README.md index 812cdca..a40560f 100644 --- a/src/_shims/README.md +++ b/src/_shims/README.md @@ -1,9 +1,9 @@ # 👋 Wondering what everything in here does? -`test3` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various +`meorphis-test3` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM). -To do this, `test3` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node. +To do this, `meorphis-test3` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node. It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to automatically select the correct shims for each environment. However, conditional exports are a fairly new @@ -15,32 +15,32 @@ getting the wrong raw `Response` type from `.asResponse()`, for example. The user can work around these issues by manually importing one of: -- `import 'test3/shims/node'` -- `import 'test3/shims/web'` +- `import 'meorphis-test3/shims/node'` +- `import 'meorphis-test3/shims/web'` All of the code here in `_shims` handles selecting the automatic default shims or manual overrides. ### How it works - Runtime -Runtime shims get installed by calling `setShims` exported by `test3/_shims/registry`. +Runtime shims get installed by calling `setShims` exported by `meorphis-test3/_shims/registry`. -Manually importing `test3/shims/node` or `test3/shims/web`, calls `setShims` with the respective runtime shims. +Manually importing `meorphis-test3/shims/node` or `meorphis-test3/shims/web`, calls `setShims` with the respective runtime shims. -All client code imports shims from `test3/_shims/index`, which: +All client code imports shims from `meorphis-test3/_shims/index`, which: - checks if shims have been set manually -- if not, calls `setShims` with the shims from `test3/_shims/auto/runtime` -- re-exports the installed shims from `test3/_shims/registry`. +- if not, calls `setShims` with the shims from `meorphis-test3/_shims/auto/runtime` +- re-exports the installed shims from `meorphis-test3/_shims/registry`. -`test3/_shims/auto/runtime` exports web runtime shims. -If the `node` export condition is set, the export map replaces it with `test3/_shims/auto/runtime-node`. +`meorphis-test3/_shims/auto/runtime` exports web runtime shims. +If the `node` export condition is set, the export map replaces it with `meorphis-test3/_shims/auto/runtime-node`. ### How it works - Type time -All client code imports shim types from `test3/_shims/index`, which selects the manual types from `test3/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `test3/_shims/auto/types`. +All client code imports shim types from `meorphis-test3/_shims/index`, which selects the manual types from `meorphis-test3/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `meorphis-test3/_shims/auto/types`. -`test3/_shims/manual-types` exports an empty namespace. -Manually importing `test3/shims/node` or `test3/shims/web` merges declarations into this empty namespace, so they get picked up by `test3/_shims/index`. +`meorphis-test3/_shims/manual-types` exports an empty namespace. +Manually importing `meorphis-test3/shims/node` or `meorphis-test3/shims/web` merges declarations into this empty namespace, so they get picked up by `meorphis-test3/_shims/index`. -`test3/_shims/auto/types` exports web type definitions. -If the `node` export condition is set, the export map replaces it with `test3/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`. +`meorphis-test3/_shims/auto/types` exports web type definitions. +If the `node` export condition is set, the export map replaces it with `meorphis-test3/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`. diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts index 58be367..505c70b 100644 --- a/src/_shims/index-deno.ts +++ b/src/_shims/index-deno.ts @@ -79,7 +79,7 @@ export function getDefaultAgent(url: string) { } export function fileFromPath() { throw new Error( - 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/stainless-sdks/meorphis-test-node#file-uploads', + 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/meorphis/test-repo-9#file-uploads', ); } diff --git a/src/_shims/index.d.ts b/src/_shims/index.d.ts index 4d6c38c..0f78ecc 100644 --- a/src/_shims/index.d.ts +++ b/src/_shims/index.d.ts @@ -2,7 +2,7 @@ * Disclaimer: modules in _shims aren't intended to be imported by SDK users. */ import { manual } from './manual-types'; -import * as auto from 'test3/_shims/auto/types'; +import * as auto from 'meorphis-test3/_shims/auto/types'; import { type RequestOptions } from '../core'; type SelectType = unknown extends Manual ? Auto : Manual; diff --git a/src/_shims/index.js b/src/_shims/index.js index a68ce57..c95f080 100644 --- a/src/_shims/index.js +++ b/src/_shims/index.js @@ -2,7 +2,7 @@ * Disclaimer: modules in _shims aren't intended to be imported by SDK users. */ const shims = require('./registry'); -const auto = require('test3/_shims/auto/runtime'); +const auto = require('meorphis-test3/_shims/auto/runtime'); if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); for (const property of Object.keys(shims)) { Object.defineProperty(exports, property, { diff --git a/src/_shims/index.mjs b/src/_shims/index.mjs index ef385d2..871591b 100644 --- a/src/_shims/index.mjs +++ b/src/_shims/index.mjs @@ -2,6 +2,6 @@ * Disclaimer: modules in _shims aren't intended to be imported by SDK users. */ import * as shims from './registry.mjs'; -import * as auto from 'test3/_shims/auto/runtime'; +import * as auto from 'meorphis-test3/_shims/auto/runtime'; if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); export * from './registry.mjs'; diff --git a/src/_shims/manual-types.d.ts b/src/_shims/manual-types.d.ts index b31c9a6..95e9a3a 100644 --- a/src/_shims/manual-types.d.ts +++ b/src/_shims/manual-types.d.ts @@ -4,8 +4,8 @@ /** * Types will get added to this namespace when you import one of the following: * - * import 'test3/shims/node' - * import 'test3/shims/web' + * import 'meorphis-test3/shims/node' + * import 'meorphis-test3/shims/web' * * Importing more than one will cause type and runtime errors. */ diff --git a/src/_shims/registry.ts b/src/_shims/registry.ts index 8ca7616..c483209 100644 --- a/src/_shims/registry.ts +++ b/src/_shims/registry.ts @@ -42,11 +42,13 @@ export let isFsReadStream: Shims['isFsReadStream'] | undefined = undefined; export function setShims(shims: Shims, options: { auto: boolean } = { auto: false }) { if (auto) { throw new Error( - `you must \`import 'test3/shims/${shims.kind}'\` before importing anything else from test3`, + `you must \`import 'meorphis-test3/shims/${shims.kind}'\` before importing anything else from meorphis-test3`, ); } if (kind) { - throw new Error(`can't \`import 'test3/shims/${shims.kind}'\` after \`import 'test3/shims/${kind}'\``); + throw new Error( + `can't \`import 'meorphis-test3/shims/${shims.kind}'\` after \`import 'meorphis-test3/shims/${kind}'\``, + ); } auto = options.auto; kind = shims.kind; diff --git a/src/_shims/web-runtime.ts b/src/_shims/web-runtime.ts index 954e5ab..980514c 100644 --- a/src/_shims/web-runtime.ts +++ b/src/_shims/web-runtime.ts @@ -9,9 +9,9 @@ export function getRuntime({ manuallyImported }: { manuallyImported?: boolean } const recommendation = manuallyImported ? `You may need to use polyfills` - : `Add one of these imports before your first \`import … from 'test3'\`: -- \`import 'test3/shims/node'\` (if you're running on Node) -- \`import 'test3/shims/web'\` (otherwise) + : `Add one of these imports before your first \`import … from 'meorphis-test3'\`: +- \`import 'meorphis-test3/shims/node'\` (if you're running on Node) +- \`import 'meorphis-test3/shims/web'\` (otherwise) `; let _fetch, _Request, _Response, _Headers; @@ -95,7 +95,7 @@ export function getRuntime({ manuallyImported }: { manuallyImported?: boolean } getDefaultAgent: (url: string) => undefined, fileFromPath: () => { throw new Error( - 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/stainless-sdks/meorphis-test-node#file-uploads', + 'The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/meorphis/test-repo-9#file-uploads', ); }, isFsReadStream: (value: any) => false, diff --git a/src/core.ts b/src/core.ts index 844c328..783364a 100644 --- a/src/core.ts +++ b/src/core.ts @@ -97,9 +97,9 @@ export class APIPromise extends Promise { * * 👋 Getting the wrong TypeScript type for `Response`? * Try setting `"moduleResolution": "NodeNext"` if you can, - * or add one of these imports before your first `import … from 'test3'`: - * - `import 'test3/shims/node'` (if you're running on Node) - * - `import 'test3/shims/web'` (otherwise) + * or add one of these imports before your first `import … from 'meorphis-test3'`: + * - `import 'meorphis-test3/shims/node'` (if you're running on Node) + * - `import 'meorphis-test3/shims/web'` (otherwise) */ asResponse(): Promise { return this.responsePromise.then((p) => p.response); @@ -113,9 +113,9 @@ export class APIPromise extends Promise { * * 👋 Getting the wrong TypeScript type for `Response`? * Try setting `"moduleResolution": "NodeNext"` if you can, - * or add one of these imports before your first `import … from 'test3'`: - * - `import 'test3/shims/node'` (if you're running on Node) - * - `import 'test3/shims/web'` (otherwise) + * or add one of these imports before your first `import … from 'meorphis-test3'`: + * - `import 'meorphis-test3/shims/node'` (if you're running on Node) + * - `import 'meorphis-test3/shims/web'` (otherwise) */ async withResponse(): Promise<{ data: T; response: Response }> { const [data, response] = await Promise.all([this.parse(), this.asResponse()]); diff --git a/src/version.ts b/src/version.ts index c2ab9b6..b0bfd9e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.1'; +export const VERSION = '0.1.0-alpha.1'; // x-release-please-version diff --git a/tests/api-resources/accounts/accounts.test.ts b/tests/api-resources/accounts/accounts.test.ts index bb2d944..de2f440 100644 --- a/tests/api-resources/accounts/accounts.test.ts +++ b/tests/api-resources/accounts/accounts.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/api-resources/accounts/credit-configurations.test.ts b/tests/api-resources/accounts/credit-configurations.test.ts index 01453d9..7a0bb8d 100644 --- a/tests/api-resources/accounts/credit-configurations.test.ts +++ b/tests/api-resources/accounts/credit-configurations.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/api-resources/cards/cards.test.ts b/tests/api-resources/cards/cards.test.ts index ced85ff..fb5ca34 100644 --- a/tests/api-resources/cards/cards.test.ts +++ b/tests/api-resources/cards/cards.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/api-resources/cards/financial-transactions.test.ts b/tests/api-resources/cards/financial-transactions.test.ts index d87fe42..80d61fd 100644 --- a/tests/api-resources/cards/financial-transactions.test.ts +++ b/tests/api-resources/cards/financial-transactions.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/api-resources/cards/provisions.test.ts b/tests/api-resources/cards/provisions.test.ts index c0b422b..4a4817a 100644 --- a/tests/api-resources/cards/provisions.test.ts +++ b/tests/api-resources/cards/provisions.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/api-resources/statuses.test.ts b/tests/api-resources/statuses.test.ts index ee0116f..a06fa65 100644 --- a/tests/api-resources/statuses.test.ts +++ b/tests/api-resources/statuses.test.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; +import MeorphisTest from 'meorphis-test3'; import { Response } from 'node-fetch'; const meorphisTest = new MeorphisTest({ diff --git a/tests/form.test.ts b/tests/form.test.ts index 3f38030..ceaefc7 100644 --- a/tests/form.test.ts +++ b/tests/form.test.ts @@ -1,6 +1,6 @@ -import { multipartFormRequestOptions, createForm } from 'test3/core'; -import { Blob } from 'test3/_shims/index'; -import { toFile } from 'test3'; +import { multipartFormRequestOptions, createForm } from 'meorphis-test3/core'; +import { Blob } from 'meorphis-test3/_shims/index'; +import { toFile } from 'meorphis-test3'; describe('form data validation', () => { test('valid values do not error', async () => { diff --git a/tests/index.test.ts b/tests/index.test.ts index e3a8cea..0a1fff1 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import MeorphisTest from 'test3'; -import { APIUserAbortError } from 'test3'; -import { Headers } from 'test3/core'; +import MeorphisTest from 'meorphis-test3'; +import { APIUserAbortError } from 'meorphis-test3'; +import { Headers } from 'meorphis-test3/core'; import defaultFetch, { Response, type RequestInit, type RequestInfo } from 'node-fetch'; describe('instantiate client', () => { diff --git a/tests/responses.test.ts b/tests/responses.test.ts index 468e6e8..7444cb7 100644 --- a/tests/responses.test.ts +++ b/tests/responses.test.ts @@ -1,5 +1,5 @@ -import { createResponseHeaders } from 'test3/core'; -import { Headers } from 'test3/_shims/index'; +import { createResponseHeaders } from 'meorphis-test3/core'; +import { Headers } from 'meorphis-test3/_shims/index'; describe('response parsing', () => { // TODO: test unicode characters diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 5a684d6..2017201 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -1,4 +1,4 @@ -import { APIClient } from 'test3/core'; +import { APIClient } from 'meorphis-test3/core'; const { stringifyQuery } = APIClient.prototype as any; diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts index 5d0fc2a..be3912a 100644 --- a/tests/uploads.test.ts +++ b/tests/uploads.test.ts @@ -1,6 +1,6 @@ import fs from 'fs'; -import { toFile, type ResponseLike } from 'test3/uploads'; -import { File } from 'test3/_shims/index'; +import { toFile, type ResponseLike } from 'meorphis-test3/uploads'; +import { File } from 'meorphis-test3/_shims/index'; class MyClass { name: string = 'foo'; diff --git a/tsconfig.build.json b/tsconfig.build.json index 8aaa8d5..e003a3f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -5,8 +5,8 @@ "compilerOptions": { "rootDir": "./dist/src", "paths": { - "test3/*": ["dist/src/*"], - "test3": ["dist/src/index.ts"], + "meorphis-test3/*": ["dist/src/*"], + "meorphis-test3": ["dist/src/index.ts"], }, "noEmit": false, "declaration": true, diff --git a/tsconfig.deno.json b/tsconfig.deno.json index bd23572..43e792e 100644 --- a/tsconfig.deno.json +++ b/tsconfig.deno.json @@ -6,9 +6,9 @@ "rootDir": "./deno", "lib": ["es2020", "DOM"], "paths": { - "test3/_shims/auto/*": ["deno/_shims/auto/*-deno"], - "test3/*": ["deno/*"], - "test3": ["deno/index.ts"], + "meorphis-test3/_shims/auto/*": ["deno/_shims/auto/*-deno"], + "meorphis-test3/*": ["deno/*"], + "meorphis-test3": ["deno/index.ts"], }, "noEmit": true, "declaration": true, diff --git a/tsconfig.json b/tsconfig.json index 7eb17b4..2edcdc7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,9 +9,9 @@ "esModuleInterop": true, "baseUrl": "./", "paths": { - "test3/_shims/auto/*": ["src/_shims/auto/*-node"], - "test3/*": ["src/*"], - "test3": ["src/index.ts"], + "meorphis-test3/_shims/auto/*": ["src/_shims/auto/*-node"], + "meorphis-test3/*": ["src/*"], + "meorphis-test3": ["src/index.ts"], }, "noEmit": true,