Skip to content

Commit 2cb4eba

Browse files
committed
Renaming to LaravelService
1 parent 1dbb46c commit 2cb4eba

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
types: [published]
66

77
permissions:
8-
id-token: write # Required for OIDC
8+
id-token: write # Required for OIDC
99
contents: read
1010

1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416

1517
steps:
1618
- uses: actions/checkout@v4
@@ -21,4 +23,5 @@ jobs:
2123
registry-url: 'https://registry.npmjs.org'
2224

2325
- run: npm install
26+
- run: npm run build
2427
- run: npm publish --provenance --access public

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ npx sst-laravel init
4141
To start using, you only need to import the component in your `sst.config.ts` file:
4242

4343
```ts
44-
import { Laravel } from "@kirschbaum-development/sst-laravel";
44+
import { LaravelService } from "@kirschbaum-development/sst-laravel";
4545
```
4646

4747
And now you can start using the `Laravel` SST component. All the configuration options are Typescript files with documentation, so
@@ -53,7 +53,7 @@ To check the full list of options. check [here](https://github.com/kirschbaum-de
5353
Setting up your app to receive HTTP requests, on the `laravel-sst-demo.kdg.dev` domain (with SSL), with auto-scaling with a max of 3 servers.
5454

5555
```js
56-
const app = new Laravel('MyLaravelApp', {
56+
const app = new LaravelService('MyLaravelApp', {
5757
web: {
5858
domain: 'laravel-sst-demo.kdg.dev',
5959
scaling: {
@@ -74,7 +74,7 @@ SST Laravel will automatically deploy and configure worker containers running yo
7474
**Running the Laravel scheduler**
7575

7676
```js
77-
const app = new Laravel('MyLaravelApp', {
77+
const app = new LaravelService('MyLaravelApp', {
7878
workers: [
7979
{
8080
name: 'scheduler',
@@ -87,7 +87,7 @@ const app = new Laravel('MyLaravelApp', {
8787
**Running the Laravel Horizon**
8888

8989
```js
90-
const app = new Laravel('MyLaravelApp', {
90+
const app = new LaravelService('MyLaravelApp', {
9191
workers: [
9292
{
9393
name: 'horizon',
@@ -100,7 +100,7 @@ const app = new Laravel('MyLaravelApp', {
100100
**Running custom commands**
101101

102102
```js
103-
const app = new Laravel('MyLaravelApp', {
103+
const app = new LaravelService('MyLaravelApp', {
104104
workers: [
105105
{
106106
name: 'worker',
@@ -127,7 +127,7 @@ There are multiple ways to configure environment variables. If you want SST Lara
127127
The below configuration would copy a file named `.env.$STAGE` (e.g. `.env.production`) into the deployment containers as your `.env` file.
128128

129129
```js
130-
const app = new Laravel('MyLaravelApp', {
130+
const app = new LaravelService('MyLaravelApp', {
131131
// ...
132132
config: {
133133
environment: {
@@ -140,7 +140,7 @@ const app = new Laravel('MyLaravelApp', {
140140
You can also configure it to use simply `.env`.
141141

142142
```js
143-
const app = new Laravel('MyLaravelApp', {
143+
const app = new LaravelService('MyLaravelApp', {
144144
// ...
145145
config: {
146146
environment: {
@@ -161,7 +161,7 @@ const database = new sst.aws.Postgres('MyDatabase', { vpc });
161161
const redis = new sst.aws.Redis("MyRedis", { vpc });
162162
const bucket = new sst.aws.Bucket("MyBucket");
163163

164-
const app = new Laravel('MyLaravelApp', {
164+
const app = new LaravelService('MyLaravelApp', {
165165
link: [database, redis, bucket],
166166
});
167167
```
@@ -175,7 +175,7 @@ You can also [import existing resources](https://sst.dev/docs/import-resources/)
175175
If you need to customize the environment variable names for your resources, you can provide an object with the resource and a callback function in the `link` array:
176176

177177
```js
178-
const app = new Laravel('MyLaravelApp', {
178+
const app = new LaravelService('MyLaravelApp', {
179179
link: [
180180
email,
181181
{
@@ -223,7 +223,7 @@ The IAM permissions for the linked resources are also automatically added to the
223223
You can configure the PHP version, custom environment variables and a custom deployment script.
224224

225225
```js
226-
const app = new Laravel('MyLaravelApp', {
226+
const app = new LaravelService('MyLaravelApp', {
227227
config: {
228228
php: 8.4,
229229
opcache: true,

docs/api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Constructor
44

55
```typescript
6-
new Laravel(name: string, args: LaravelArgs, opts?: ComponentResourceOptions)
6+
new LaravelService(name: string, args: LaravelArgs, opts?: ComponentResourceOptions)
77
```
88

99
Creates a new Laravel component for deploying Laravel applications to AWS Fargate.
@@ -247,7 +247,7 @@ config: {
247247

248248
**Example:**
249249
```typescript
250-
const app = new Laravel("MyApp", { ... });
250+
const app = new LaravelService("MyApp", { ... });
251251
console.log(app.url); // https://example.com or https://xyz.elb.amazonaws.com
252252
```
253253

@@ -259,7 +259,7 @@ const database = new sst.aws.Postgres("MyDatabase", { vpc });
259259
const redis = new sst.aws.Redis("MyRedis", { vpc });
260260
const bucket = new sst.aws.Bucket("MyBucket");
261261

262-
const app = new Laravel("MyApp", {
262+
const app = new LaravelService("MyApp", {
263263
path: "./",
264264
vpc,
265265

laravel-sst.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export interface LaravelArgs extends ClusterArgs {
202202
}
203203
}
204204

205-
export class Laravel extends Component {
205+
export class LaravelService extends Component {
206206
private readonly services: Record<string, sst.aws.Service>;
207207

208208
constructor(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kirschbaum-development/sst-laravel",
3-
"version": "0.0.13",
3+
"version": "0.0.14",
44
"type": "module",
55
"description": "An unofficial extension of SST to deploy containerized Laravel applications to AWS Fargate.",
66
"main": "laravel-sst.ts",

templates/sst.config.run.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const { Laravel } = await import("@kirschbaum-development/sst-laravel");
1+
const { LaravelService } = await import("@kirschbaum-development/sst-laravel");
22
const vpc = new sst.aws.Vpc("MyVpc");
33
// you can also use an existing VPC
44
// const vpc = sst.aws.Vpc.get("DefaultVpc", "vpc-12345678901234567");
55

66
const database = new sst.aws.Postgres('MyDB', { vpc });
77

8-
const app = new Laravel("MyLaravelApp", {
8+
const app = new LaravelService("MyLaravelApp", {
99
vpc,
1010
link: [database],
1111

0 commit comments

Comments
 (0)