Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# packages

Internal packages used by the Botpress team accross multiple repositories.
Internal packages used by the Botpress team across multiple repositories.

These packages are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, they were still left intentionally public for an important reason : **We Love Open-Source**.

Therefore, if you wish to install or fork any of these packages feel absolutly free to do it. We strongly recommend that you tag your versions properly.
Therefore, if you wish to install or fork any of these packages feel absolutely free to do it. We strongly recommend that you tag your versions properly.

## Licensing

Expand Down
4 changes: 2 additions & 2 deletions depsynky/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# DepSynky

CLI to synchronize dependencies accross a pnpm mono-repo
CLI to synchronize dependencies across a pnpm mono-repo

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion entities/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ console.log(results) // 2 of type fruit and 1 of type company

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion entities/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const main = async (argv: string[]) => {
await buildWeb()
return
}
throw new Error(`Unsuported target: ${target}`)
throw new Error(`Unsupported target: ${target}`)
}

void main(process.argv.slice(2))
Expand Down
4 changes: 2 additions & 2 deletions entities/rssrc/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ pub fn levenshtein_distance(a: &str, b: &str) -> usize {
let bj = b_chars[j - 1];
let ai = a_chars[i - 1];

let substitition_cost = if bj == ai { 0 } else { 1 };
let substitution_cost = if bj == ai { 0 } else { 1 };

res = lodash::min(&[
tmp + substitition_cost, // substitution
tmp + substitution_cost, // substitution
res + 1, // insertion
row[i] + 1, // deletion
])
Expand Down
6 changes: 3 additions & 3 deletions entities/src/lists.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe.each(['wasm', 'javascript'] satisfies ListEntityEngine[])('%s list enti
)
})

test('same occurence in multiple entities extracts multiple entities', () => {
test('same occurrence in multiple entities extracts multiple entities', () => {
// arrange
const testEntities: ListEntityDef[] = [
...listEntities,
Expand Down Expand Up @@ -123,9 +123,9 @@ describe.each(['wasm', 'javascript'] satisfies ListEntityEngine[])('%s list enti

describe('fuzzy match', () => {
describe('loose fuzzy', () => {
entityTest('[Qebec citty] is a city within [QC], a provice.', { qty: 1, value: 'YQB' }, { qty: 0 })
entityTest('[Qebec citty] is a city within [QC], a province.', { qty: 1, value: 'YQB' }, { qty: 0 })
entityTest(
'A quaterback is also called a [QB] and [sn francisco] used to have one',
'A quarterback is also called a [QB] and [sn francisco] used to have one',
{ qty: 0 },
{ qty: 1, value: 'SFO' }
)
Expand Down
2 changes: 1 addition & 1 deletion entities/src/lists/engines/wasm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const maybeInitialize = () => {
* It seems that, someone in the process is responsible for freeing them, but I don't know who.
* It is not really clear in the wasm-bindgen documentation, and the generated code is not easy to read.
*
* However, outputs of wasm functions must be freed, otherwise there will be memory leaks.
* However, outputs of wasm functions must be freed; otherwise, there will be memory leaks.
*/

type Model = ListEntityModel
Expand Down
2 changes: 1 addition & 1 deletion es-node/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ like ts-node, but uses esbuild.

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion genenv/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export const MY_ENV3 = '$MY_ENV3' // default value

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion jex/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ console.log(res2) // false

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install this package feel absolutly free to do it. We strongly recomand that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion jex/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class JexUnresolvedReferenceError extends JexInvalidJsonSchemaError {
}
}

export class JexUnsuportedJsonSchemaError extends JexInvalidJsonSchemaError {
export class JexUnsupportedJsonSchemaError extends JexInvalidJsonSchemaError {
public constructor(path: PropertyPath, schema: JSONSchema7Definition) {
const pathString = pathToString(path)
super(path, `Unsupported JSON schema at ${pathString}: ${JSON.stringify(schema)}`)
Expand Down
6 changes: 3 additions & 3 deletions jex/src/jexir/from-json-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const expectJsonSchema = (jsonSchema: JSONSchema7) => ({
}
})

test('JexIR should should throw an error when the JSON schema is unsuported', () => {
test('JexIR should throw an error when the JSON schema is unsupported', () => {
const foo = (schema: JSONSchema7) => $.object({ foo: schema })
const path: PropertyPath = [
{ type: 'key', value: 'properties' },
Expand All @@ -47,7 +47,7 @@ test('JexIR should should throw an error when the JSON schema is unsuported', ()
expectJsonSchema(foo({ else: {} })).toFailAt(path)
})

test('JexIR should should throw an error when schema contains unresolved references', () => {
test('JexIR should throw an error when schema contains unresolved references', () => {
const path: PropertyPath = [
{ type: 'key', value: 'items' },
{ type: 'number-index', value: 2 }
Expand Down Expand Up @@ -187,7 +187,7 @@ test('JexIR should model map types', () => {
})
})

test('JexIR should model a object type with both properties and additionalProperties', () => {
test('JexIR should model an object type with both properties and additionalProperties', () => {
expectJsonSchema({
type: 'object',
properties: {
Expand Down
14 changes: 7 additions & 7 deletions jex/src/jexir/from-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ const _toInternalRep = (path: JSONSchemaPropertyPath, schema: JSONSchema7Definit
}

if (schema.oneOf !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { oneOf: schema.oneOf })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { oneOf: schema.oneOf })
}

if (schema.$ref !== undefined) {
throw new errors.JexUnresolvedReferenceError(path.path)
}

if (schema.patternProperties !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { patternProperties: schema.patternProperties })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { patternProperties: schema.patternProperties })
}

if (schema.propertyNames !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { propertyNames: schema.propertyNames })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { propertyNames: schema.propertyNames })
}

if (schema.if !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { if: schema.if })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { if: schema.if })
}

if (schema.then !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { then: schema.then })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { then: schema.then })
}

if (schema.else !== undefined) {
throw new errors.JexUnsuportedJsonSchemaError(path.path, { else: schema.else })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { else: schema.else })
}

if (schema.not !== undefined) {
Expand All @@ -114,7 +114,7 @@ const _toInternalRep = (path: JSONSchemaPropertyPath, schema: JSONSchema7Definit
}
}

throw new errors.JexUnsuportedJsonSchemaError(path.path, { not: schema.not })
throw new errors.JexUnsupportedJsonSchemaError(path.path, { not: schema.not })
}

if (Array.isArray(schema.type)) {
Expand Down
4 changes: 2 additions & 2 deletions log4bot/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import { Logger } from '@bpinternal/log4bot'
const logger = new Logger('main', { prefix: 'MYAPP', level: 'debug' })
logger.info('I love Botpress.', { afield: '42' })

logger.attachError(new Error('Precondition Failed')).error('An error occured')
logger.attachError(new Error('Precondition Failed')).error('An error occurred')
```

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion log4bot/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Logger implements types.Logger {
this._filters = _.mapValues(config.filters, regexParser) as any as { [level: string]: RegExp }
}

// logger configures all childs
// logger configures all children
for (const logger of this._loggers.values()) {
logger.configure(config)
}
Expand Down
2 changes: 1 addition & 1 deletion mcp-gen/src/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('api', () => {
await expect(generateIntegrationWithConfig({ outputDir: './output' })).rejects.toThrow('mcpServerUrl is required')
})

it('should fallback to http transport when config has no type', async () => {
it('should fall back to http transport when config has no type', async () => {
mockLoad.mockResolvedValue({ name: 'test', url: 'http://localhost:3000' } as any)
mockGenerate.mockResolvedValue(undefined)

Expand Down
4 changes: 2 additions & 2 deletions opapi/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const api = new OpenApi({
{
status: 403,
type: 'Forbidden',
description: "The requested action can't be peform by this resource.",
description: "The requested action can't be perform by this resource.",
},
{
status: 400,
Expand Down Expand Up @@ -88,6 +88,6 @@ api.exportClient('./gen/client') // This will generate a client that can be used

## Disclaimer ⚠️

This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutly free to do it. We strongly recommend that you tag your versions properly.
This package is published under the `@bpinternal` organization. All packages of this organization are meant to be used by the [Botpress](https://github.com/botpress/botpress) team internally and are not meant for our community. Since the packages are catered to our own use-cases, they might have less stable APIs, receive breaking changes without much warning, have minimal documentation and lack community-focused support. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install or fork this package feel absolutely free to do it. We strongly recommend that you tag your versions properly.

The Botpress Engineering team.
2 changes: 1 addition & 1 deletion opapi/src/generators/client-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const fixSchema = (schema: JSONSchema7): JSONSchema7 => {
return schema
}

// usefull for debugging, remove when generator is stable
// useful for debugging, remove when generator is stable
const debugSchema =
(inputSchema: JSONSchema7, key: string, enable: boolean = false) =>
(tsCode: string) => {
Expand Down
6 changes: 3 additions & 3 deletions opapi/src/generators/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare const window: any
type CryptoLib = { getRandomValues(array: Uint8Array): Uint8Array }

const cryptoLibPolyfill: CryptoLib = {
// Fallback in case crypto isn't available.
// Fallback when crypto isn't available.
getRandomValues: (array: Uint8Array) => new Uint8Array(array.map(() => Math.floor(Math.random() * 256))),
}

Expand All @@ -51,7 +51,7 @@ let cryptoLib: CryptoLib =
: crypto

if (!cryptoLib.getRandomValues) {
// Use a polyfill in older environments that have a crypto implementaton missing getRandomValues()
// Use a polyfill in older environments that have a crypto implementation missing getRandomValues()
cryptoLib = cryptoLibPolyfill
}

Expand Down Expand Up @@ -136,7 +136,7 @@ export const errorFrom = (err: unknown): ApiError => {
}

function getApiErrorFromObject(err: any) {
// Check if it's an deserialized API error object
// Check if it's a deserialized API error object
if (typeof err === 'object' && 'code' in err && 'type' in err && 'id' in err && 'message' in err && typeof err.type === 'string' && typeof err.message === 'string') {
const ErrorClass = errorTypes[err.type]
if (!ErrorClass) {
Expand Down
Loading
Loading