forked from mediar-ai/screenpipe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
282a7e3
commit 2e9a82b
Showing
122 changed files
with
13,200 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM debian:bookworm-slim AS stainless | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
nodejs \ | ||
npm \ | ||
yarnpkg \ | ||
&& apt-get clean autoclean | ||
|
||
# Ensure UTF-8 encoding | ||
ENV LANG=C.UTF-8 | ||
ENV LC_ALL=C.UTF-8 | ||
|
||
# Yarn | ||
RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn | ||
|
||
WORKDIR /workspace | ||
|
||
COPY package.json yarn.lock /workspace/ | ||
|
||
RUN yarn install | ||
|
||
COPY . /workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian | ||
{ | ||
"name": "Debian", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
} | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'unused-imports', 'prettier'], | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'prettier/prettier': 'error', | ||
'unused-imports/no-unused-imports': 'error', | ||
}, | ||
root: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- next | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Bootstrap | ||
run: ./scripts/bootstrap | ||
|
||
- name: Check types | ||
run: ./scripts/lint | ||
|
||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Bootstrap | ||
run: ./scripts/bootstrap | ||
|
||
- name: Check build | ||
run: ./scripts/build | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Bootstrap | ||
run: ./scripts/bootstrap | ||
|
||
- name: Run tests | ||
run: ./scripts/test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.prism.log | ||
node_modules | ||
yarn-error.log | ||
codegen.log | ||
Brewfile.lock.json | ||
dist | ||
dist-deno | ||
/*.tgz | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CHANGELOG.md | ||
/ecosystem-tests/*/** | ||
/node_modules | ||
/deno | ||
|
||
# don't format tsc output, will break source maps | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"arrowParens": "always", | ||
"experimentalTernaries": true, | ||
"printWidth": 110, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
configured_endpoints: 23 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/none-neo773%2Ftest-sc-d1c7b421ebbc36e6da2729a265224ade9ed7fe420dfd9ecb1aa37cbfafc05048.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brew "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
## Setting up the environment | ||
|
||
This repository uses [`yarn@v1`](https://classic.yarnpkg.com/lang/en/docs/install). | ||
Other package managers may work but are not officially supported for development. | ||
|
||
To set up the repository, run: | ||
|
||
```sh | ||
$ yarn | ||
$ yarn build | ||
``` | ||
|
||
This will install all the required dependencies and build output files to `dist/`. | ||
|
||
## Modifying/Adding code | ||
|
||
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may | ||
result in merge conflicts between manual patches and changes from the generator. The generator will never | ||
modify the contents of the `src/lib/` and `examples/` directories. | ||
|
||
## Adding and running examples | ||
|
||
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. | ||
|
||
```ts | ||
// add an example to examples/<your-example>.ts | ||
|
||
#!/usr/bin/env -S npm run tsn -T | ||
… | ||
``` | ||
|
||
```sh | ||
$ chmod +x examples/<your-example>.ts | ||
# run the example against your api | ||
$ yarn tsn -T examples/<your-example>.ts | ||
``` | ||
|
||
## Using the repository from source | ||
|
||
If you’d like to use the repository from source, you can either install from git or link to a cloned repository: | ||
|
||
To install via git: | ||
|
||
```sh | ||
$ npm install git+ssh://[email protected]:stainless-sdks/test-sc-node.git | ||
``` | ||
|
||
Alternatively, to link a local copy of the repo: | ||
|
||
```sh | ||
# Clone | ||
$ git clone https://www.github.com/stainless-sdks/test-sc-node | ||
$ cd test-sc-node | ||
|
||
# With yarn | ||
$ yarn link | ||
$ cd ../my-package | ||
$ yarn link test-sc | ||
|
||
# With pnpm | ||
$ pnpm link --global | ||
$ cd ../my-package | ||
$ pnpm link -—global test-sc | ||
``` | ||
|
||
## Running tests | ||
|
||
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. | ||
|
||
```sh | ||
$ npx prism mock path/to/your/openapi.yml | ||
``` | ||
|
||
```sh | ||
$ yarn run test | ||
``` | ||
|
||
## Linting and formatting | ||
|
||
This repository uses [prettier](https://www.npmjs.com/package/prettier) and | ||
[eslint](https://www.npmjs.com/package/eslint) to format the code in the repository. | ||
|
||
To lint: | ||
|
||
```sh | ||
$ yarn lint | ||
``` | ||
|
||
To format and fix all lint issues automatically: | ||
|
||
```sh | ||
$ yarn fix | ||
``` |
Oops, something went wrong.