Skip to content

Commit 489a75a

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore: go live (#3)
1 parent 4b92c79 commit 489a75a

File tree

121 files changed

+10267
-13296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+10267
-13296
lines changed

.devcontainer/Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1
2+
FROM debian:bookworm-slim AS stainless
3+
4+
RUN apt-get update && apt-get install -y \
5+
nodejs \
6+
npm \
7+
yarnpkg \
8+
&& apt-get clean autoclean
9+
10+
# Ensure UTF-8 encoding
11+
ENV LANG=C.UTF-8
12+
ENV LC_ALL=C.UTF-8
13+
14+
# Yarn
15+
RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
16+
17+
WORKDIR /workspace
18+
19+
COPY package.json yarn.lock /workspace/
20+
21+
RUN yarn install
22+
23+
COPY . /workspace

.devcontainer/devcontainer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Debian",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
}
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
// "features": {},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Configure tool-specific properties.
16+
// "customizations": {},
17+
18+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
19+
// "remoteUser": "root"
20+
}

.eslintignore

-2
This file was deleted.

.eslintrc.js

+7-69
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,10 @@
11
module.exports = {
2-
root: true,
3-
extends: ['airbnb-base', 'plugin:jest/recommended', 'prettier', 'plugin:prettier/recommended'],
4-
plugins: ['better-mutation', 'jest', '@typescript-eslint', 'prettier', 'import'],
5-
settings: {
6-
'import/parsers': {
7-
'@typescript-eslint/parser': ['.ts']
8-
},
9-
'import/extensions': ['.js', '.ts'],
10-
'import/resolver': {
11-
node: {
12-
extensions: ['.js', '.ts', '.json']
13-
}
14-
}
15-
},
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
164
rules: {
17-
// prettier
18-
'prettier/prettier': [
19-
'error',
20-
{},
21-
{
22-
usePrettierrc: true
23-
}
24-
],
25-
indent: 'off',
26-
// jest
27-
'jest/no-conditional-expect': 'warn',
28-
// other
29-
'no-underscore-dangle': 'off',
30-
'class-methods-use-this': 'off',
31-
'no-named-as-default': 'off',
32-
'import/prefer-default-export': 'off',
33-
'import/order': ['error', { 'newlines-between': 'always', alphabetize: { order: 'asc' } }],
34-
'sort-imports': ['error', { ignoreDeclarationSort: true, ignoreCase: true }]
5+
'no-unused-vars': 'off',
6+
'prettier/prettier': 'error',
7+
'unused-imports/no-unused-imports': 'error',
358
},
36-
overrides: [
37-
{
38-
files: ['*.ts', '** /*.test.ts'],
39-
parser: '@typescript-eslint/parser',
40-
parserOptions: {
41-
project: './tsconfig.json',
42-
ecmaVersion: 2022,
43-
sourceType: 'module'
44-
},
45-
extends: ['airbnb-typescript/base', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking'],
46-
rules: {
47-
// use prettier
48-
'@typescript-eslint/semi': ['error', 'never'],
49-
'@typescript-eslint/comma-dangle': ['error', 'never'],
50-
'@typescript-eslint/quotes': ['error', 'single'],
51-
'@typescript-eslint/indent': 'off',
52-
// other
53-
'@typescript-eslint/no-unsafe-call': 'off',
54-
'@typescript-eslint/no-unsafe-assignment': 'off',
55-
'@typescript-eslint/no-unsafe-member-access': 'off',
56-
'@typescript-eslint/naming-convention': 'off',
57-
// temp
58-
'@typescript-eslint/no-unsafe-return': 'off',
59-
'@typescript-eslint/no-explicit-any': 'off',
60-
'@typescript-eslint/no-unsafe-argument': 'off',
61-
'@typescript-eslint/unbound-method': 'off'
62-
}
63-
},
64-
{
65-
files: ['*.js'],
66-
parserOptions: {
67-
ecmaVersion: 2022,
68-
sourceType: 'module'
69-
}
70-
}
71-
]
72-
}
9+
root: true,
10+
};

.github/CONTRIBUTING.md

-3
This file was deleted.

.github/ISSUE_TEMPLATE.md

-9
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

-7
This file was deleted.

.github/workflows/ci.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
lint:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '18'
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: Check types
28+
run: ./scripts/lint
29+
test:
30+
name: test
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up Node
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18'
40+
41+
- name: Bootstrap
42+
run: ./scripts/bootstrap
43+
44+
- name: Run tests
45+
run: ./scripts/test
46+

.github/workflows/npm-publish.yml

-60
This file was deleted.

.github/workflows/publish-npm.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/prompt-foundry/typescript-sdk/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '18'
23+
24+
- name: Install dependencies
25+
run: |
26+
yarn install
27+
28+
- name: Publish to NPM
29+
run: |
30+
bash ./bin/publish-npm
31+
env:
32+
NPM_TOKEN: ${{ secrets.PROMPT_FOUNDRY_NPM_TOKEN || secrets.NPM_TOKEN }}

.github/workflows/pull_request.yml

-41
This file was deleted.

.github/workflows/release-doctor.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'prompt-foundry/typescript-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
NPM_TOKEN: ${{ secrets.PROMPT_FOUNDRY_NPM_TOKEN || secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)