Skip to content

Commit

Permalink
Drop exposed S3 handler in favor of @balena/pinejs-webresource-s3 han…
Browse files Browse the repository at this point in the history
…dler

Change-type: major
  • Loading branch information
otaviojacobi authored and Page- committed Jan 6, 2025
1 parent 89b0cbf commit 7edc621
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 154 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"devDependencies": {
"@balena/lint": "^8.2.8",
"@balena/pinejs": "file:./",
"@balena/pinejs-webresource-s3": "^1.0.2",
"@faker-js/faker": "^9.3.0",
"@types/busboy": "^1.5.4",
"@types/chai": "^5.0.1",
Expand Down
143 changes: 0 additions & 143 deletions src/webresource-handler/handlers/S3Handler.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/webresource-handler/handlers/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './NoopHandler.js';
export * from './S3Handler.js';
19 changes: 9 additions & 10 deletions test/fixtures/06-webresource/config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import type { ConfigLoader } from '@balena/pinejs';
import { webResourceHandler } from '@balena/pinejs';
import { S3Handler } from '@balena/pinejs-webresource-s3';
import { v1AbstractSqlModel, v1Translations } from './translations/v1/index.js';
import { requiredVar, intVar } from '@balena/env-parsing';

const apiRoot = 'example';
const modelName = 'example';
const modelFile = import.meta.dirname + '/example.sbvr';

const s3Handler: webResourceHandler.WebResourceHandler =
new webResourceHandler.S3Handler({
bucket: requiredVar('S3_STORAGE_ADAPTER_BUCKET'),
region: requiredVar('S3_REGION'),
accessKey: requiredVar('S3_ACCESS_KEY'),
secretKey: requiredVar('S3_SECRET_KEY'),
endpoint: requiredVar('S3_ENDPOINT'),
maxSize: intVar('PINEJS_WEBRESOURCE_MAXFILESIZE'),
});
const s3Handler = new S3Handler({
bucket: requiredVar('S3_STORAGE_ADAPTER_BUCKET'),
region: requiredVar('S3_REGION'),
accessKey: requiredVar('S3_ACCESS_KEY'),
secretKey: requiredVar('S3_SECRET_KEY'),
endpoint: requiredVar('S3_ENDPOINT'),
maxSize: intVar('PINEJS_WEBRESOURCE_MAXFILESIZE'),
});

export default {
models: [
Expand Down

0 comments on commit 7edc621

Please sign in to comment.